MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / HashH

Function HashH

crypto/hash/hashfuncs.go:48–50  ·  view source on GitHub ↗

HashH calculates hash(b) and returns the resulting bytes as a Hash.

(b []byte)

Source from the content-addressed store, hash-verified

46
47// HashH calculates hash(b) and returns the resulting bytes as a Hash.
48func HashH(b []byte) Hash {
49 return Hash(sha256.Sum256(b))
50}
51
52// FNVHash32B calculates hash(b) into [0, 2^64] and returns the resulting bytes.
53func FNVHash32B(b []byte) []byte {

Callers 8

TestMetaStateFunction · 0.92
GenerateAnswerFunction · 0.92
TestNewAnswerFunction · 0.92
TestGenerateAnswerFunction · 0.92
initFunction · 0.92
hashKeyFunction · 0.92
TestDBMSFunction · 0.92
TestHashFuncsFunction · 0.85

Calls 1

HashTypeAlias · 0.85

Tested by 6

TestMetaStateFunction · 0.74
TestNewAnswerFunction · 0.74
TestGenerateAnswerFunction · 0.74
initFunction · 0.74
TestDBMSFunction · 0.74
TestHashFuncsFunction · 0.68