MCPcopy Create free account
hub / github.com/appleboy/CodeGPT / helperCacheKey

Function helperCacheKey

util/api_key_helper.go:32–35  ·  view source on GitHub ↗

helperCacheKey returns the credstore key for a given helper command.

(helperCmd string)

Source from the content-addressed store, hash-verified

30
31// helperCacheKey returns the credstore key for a given helper command.
32func helperCacheKey(helperCmd string) string {
33 hash := sha256.Sum256([]byte(helperCmd))
34 return helperKeyPrefix + hex.EncodeToString(hash[:])
35}
36
37// readCache reads the cached API key from credstore.
38func readCache(helperCmd string) (*apiKeyCache, error) {

Callers 3

readCacheFunction · 0.85
writeCacheFunction · 0.85

Calls

no outgoing calls