MCPcopy
hub / github.com/canopy-network/canopy / Hasher

Function Hasher

lib/crypto/hash.go:25–25  ·  view source on GitHub ↗

* Hash is a function that takes an input message and returns a fixed-size string of bytes that is unique to the input to produce a short, fixed-length representation of the data, which can be used for various applications like data integrity checks */ Hasher() returns the global hashing alg

()

Source from the content-addressed store, hash-verified

23
24// Hasher() returns the global hashing algorithm used
25func Hasher() hash.Hash { return sha256.New() }
26
27// Hash() executes the global hashing algorithm on input bytes
28func Hash(msg []byte) []byte {

Callers 1

TestHashAndStringFunction · 0.85

Calls 1

NewMethod · 0.65

Tested by 1

TestHashAndStringFunction · 0.68