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

Function TupleHash128

crypto/sha3/tuple_hash.go:41–45  ·  view source on GitHub ↗

TupleHash128 hashes a tuple with a given customization string s. Output is written to `out`. len(out) determines the output size.

(tuple [][]byte, s []byte, out []byte)

Source from the content-addressed store, hash-verified

39// TupleHash128 hashes a tuple with a given customization string s.
40// Output is written to `out`. len(out) determines the output size.
41func TupleHash128(tuple [][]byte, s []byte, out []byte) {
42 shake := newTupleHash(128, tuple, s)
43 rightEncode(shake, uint64(len(out)*8))
44 shake.Read(out)
45}
46
47// TupleHash256 hashes a tuple with a given customization string s.
48// Output is written to `out`. len(out) determines the output size.

Callers 3

TestTupleHashNISTSample1Function · 0.85
TestTupleHashNISTSample2Function · 0.85
TestTupleHashNISTSample3Function · 0.85

Calls 3

newTupleHashFunction · 0.85
rightEncodeFunction · 0.85
ReadMethod · 0.45

Tested by 3

TestTupleHashNISTSample1Function · 0.68
TestTupleHashNISTSample2Function · 0.68
TestTupleHashNISTSample3Function · 0.68