TupleHash256 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)
| 47 | // TupleHash256 hashes a tuple with a given customization string s. |
| 48 | // Output is written to `out`. len(out) determines the output size. |
| 49 | func TupleHash256(tuple [][]byte, s []byte, out []byte) { |
| 50 | shake := newTupleHash(256, tuple, s) |
| 51 | rightEncode(shake, uint64(len(out)*8)) |
| 52 | shake.Read(out) |
| 53 | } |
| 54 | |
| 55 | // TupleHashXOF128 provides an arbitrary-length output. |
| 56 | func TupleHashXOF128(tuple [][]byte, s []byte) io.Reader { |