MCPcopy Create free account
hub / github.com/chain/txvm / newTupleHasher

Function newTupleHasher

crypto/sha3/tuple_hash.go:154–158  ·  view source on GitHub ↗
(securitybits int, length int, s []byte)

Source from the content-addressed store, hash-verified

152}
153
154func newTupleHasher(securitybits int, length int, s []byte) *thash {
155 t := thash{d: newCShake(securitybits, []byte("TupleHash"), s)}
156 t.d.outputLen = length
157 return &t
158}
159
160func (t *thash) encodeOutputLength() int {
161 return rightEncode(t.d, uint64(8*t.d.outputLen))

Callers 4

NewTupleHash128Function · 0.85
NewTupleHash256Function · 0.85
NewTupleHashXOF128Function · 0.85
NewTupleHashXOF256Function · 0.85

Calls 1

newCShakeFunction · 0.85

Tested by

no test coverage detected