MCPcopy
hub / github.com/TecharoHQ/anubis / SHA256sum

Function SHA256sum

internal/hash.go:13–17  ·  view source on GitHub ↗

SHA256sum computes a cryptographic hash. Still used for proof-of-work challenges where we need the security properties of a cryptographic hash function.

(text string)

Source from the content-addressed store, hash-verified

11// SHA256sum computes a cryptographic hash. Still used for proof-of-work challenges
12// where we need the security properties of a cryptographic hash function.
13func SHA256sum(text string) string {
14 hash := sha256.New()
15 hash.Write([]byte(text))
16 return hex.EncodeToString(hash.Sum(nil))
17}
18
19// FastHash is a high-performance non-cryptographic hash function suitable for
20// internal caching, policy rule identification, and other performance-critical

Callers 15

TestBasePrefixFunction · 0.92
TestPassChallengeXSSFunction · 0.92
maybeReverseProxyMethod · 0.92
PassChallengeMethod · 0.92
NewFunction · 0.92
ValidateMethod · 0.92
ValidateMethod · 0.92
incrementUAMethod · 0.92
incrementNetworkMethod · 0.92
CheckUAMethod · 0.92
CheckNetworkMethod · 0.92

Calls 1

WriteMethod · 0.45

Tested by 9

TestBasePrefixFunction · 0.74
TestPassChallengeXSSFunction · 0.74