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

Function DoubleHashH

crypto/hash/hashfuncs.go:73–76  ·  view source on GitHub ↗

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

(b []byte)

Source from the content-addressed store, hash-verified

71// DoubleHashH calculates hash(hash(b)) and returns the resulting bytes as a
72// Hash.
73func DoubleHashH(b []byte) Hash {
74 first := sha256.Sum256(b)
75 return Hash(sha256.Sum256(first[:]))
76}
77
78// THashB is a combination of blake2b-512 and SHA256
79// The cryptographic hash function BLAKE2 is an improved version of the

Callers 1

TestDoubleHashFuncsFunction · 0.85

Calls 1

HashTypeAlias · 0.85

Tested by 1

TestDoubleHashFuncsFunction · 0.68