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

Function THashB

crypto/hash/hashfuncs.go:81–85  ·  view source on GitHub ↗

THashB is a combination of blake2b-512 and SHA256 The cryptographic hash function BLAKE2 is an improved version of the SHA-3 finalist BLAKE.

(b []byte)

Source from the content-addressed store, hash-verified

79// The cryptographic hash function BLAKE2 is an improved version of the
80// SHA-3 finalist BLAKE.
81func THashB(b []byte) []byte {
82 first := blake2b.Sum512(b)
83 second := sha256.Sum256(first[:])
84 return second[:]
85}
86
87// THashH calculates sha256(blake2b-512(b)) and returns the resulting bytes as a
88// Hash.

Callers 3

qHashFunction · 0.92
TestTHashHFunction · 0.85
BenchmarkTHashBFunction · 0.85

Calls

no outgoing calls

Tested by 3

qHashFunction · 0.74
TestTHashHFunction · 0.68
BenchmarkTHashBFunction · 0.68