MCPcopy Create free account
hub / github.com/stretchr/objx / HashWithKey

Function HashWithKey

security.go:9–12  ·  view source on GitHub ↗

HashWithKey hashes the specified string using the security key

(data, key string)

Source from the content-addressed store, hash-verified

7
8// HashWithKey hashes the specified string using the security key
9func HashWithKey(data, key string) string {
10 d := sha1.Sum([]byte(data + ":" + key))
11 return hex.EncodeToString(d[:])
12}

Callers 3

TestHashWithKeyFunction · 0.92
SignedBase64Method · 0.85
FromSignedBase64Function · 0.85

Calls

no outgoing calls

Tested by 1

TestHashWithKeyFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…