MCPcopy
hub / github.com/rsc/2fa / decodeKey

Function decodeKey

main.go:327–329  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

325}
326
327func decodeKey(key string) ([]byte, error) {
328 return base32.StdEncoding.DecodeString(strings.ToUpper(key))
329}
330
331func hotp(key []byte, counter uint64, digits int) int {
332 h := hmac.New(sha1.New, key)

Callers 2

readKeychainFunction · 0.85
addMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected