MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / SumTruncated

Function SumTruncated

crypto/tmhash/hash.go:62–65  ·  view source on GitHub ↗

SumTruncated returns the first 20 bytes of SHA256 of the bz.

(bz []byte)

Source from the content-addressed store, hash-verified

60
61// SumTruncated returns the first 20 bytes of SHA256 of the bz.
62func SumTruncated(bz []byte) []byte {
63 hash := sha256.Sum256(bz)
64 return hash[:TruncatedSize]
65}

Callers 5

TestSignVoteMethod · 0.92
AddressHashFunction · 0.92
AddressMethod · 0.92
AddressMethod · 0.92
TestHashTruncatedFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestHashTruncatedFunction · 0.74