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

Function DoubleHashB

crypto/hash/hashfuncs.go:65–69  ·  view source on GitHub ↗

DoubleHashB calculates hash(hash(b)) and returns the resulting bytes.

(b []byte)

Source from the content-addressed store, hash-verified

63
64// DoubleHashB calculates hash(hash(b)) and returns the resulting bytes.
65func DoubleHashB(b []byte) []byte {
66 first := sha256.Sum256(b)
67 second := sha256.Sum256(first[:])
68 return second[:]
69}
70
71// DoubleHashH calculates hash(hash(b)) and returns the resulting bytes as a
72// Hash.

Callers 4

DecodePrivateKeyFunction · 0.92
TestLoadPrivateKeyFunction · 0.92
KeyDerivationFunction · 0.92
TestDoubleHashFuncsFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestLoadPrivateKeyFunction · 0.74
TestDoubleHashFuncsFunction · 0.68