helperCacheKey returns the credstore key for a given helper command.
(helperCmd string)
| 30 | |
| 31 | // helperCacheKey returns the credstore key for a given helper command. |
| 32 | func 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. |
| 38 | func readCache(helperCmd string) (*apiKeyCache, error) { |
no outgoing calls