Documentation ¶
Overview ¶
Package tuplehash implements the SHA-3 derived TupleHash from NIST SP 800-185.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTupleHash128 ¶
NewTupleHash128 creates a new SHA-3 TupleHash128 as a hash.Hash.
s may either be nil or an optional customization bit string of any length, allowing a custom branded hash.
outputLen defines the final hash length in bytes. If uncertain, pick 32.
func NewTupleHash256 ¶
NewTupleHash256 creates a new SHA-3 TupleHash256 as a hash.Hash.
s may either be nil or an optional customization bit string of any length, allowing a custom branded hash.
outputLen defines the final hash length in bytes. If uncertain, pick 64.
func TupleHashSum128 ¶
TupleHashSum128 returns an arbitrary-length TupleHash for multiple byte arrays.
This function works on an internal cSHAKE128 instance.
s may either be nil or an optional customization bit string of any length, allowing a custom branded hash.
outputLen defines the final hash length in bytes. If uncertain, pick 32.
data is an array of byte arrays, each to be hashed as one tuple.
The returned byte array will be of outputLen bytes.
func TupleHashSum256 ¶
TupleHashSum256 returns an arbitrary-length TupleHash for multiple byte arrays.
This function works on an internal cSHAKE256 instance.
s may either be nil or an optional customization bit string of any length, allowing a custom branded hash.
outputLen defines the final hash length in bytes. If uncertain, pick 64.
data is an array of byte arrays, each to be hashed as one tuple.
The returned byte array will be of outputLen bytes.
Types ¶
This section is empty.