type ShakeHash … type cshakeState … const dsbyteShake … const dsbyteCShake … const rate128 … const rate256 … func bytepad(input []byte, w int) []byte { … } func leftEncode(value uint64) []byte { … } func newCShake(N, S []byte, rate, outputLen int, dsbyte byte) ShakeHash { … } // Reset resets the hash to initial state. func (c *cshakeState) Reset() { … } // Clone returns copy of a cSHAKE context within its current state. func (c *cshakeState) Clone() ShakeHash { … } // Clone returns copy of SHAKE context within its current state. func (c *state) Clone() ShakeHash { … } // NewShake128 creates a new SHAKE128 variable-output-length ShakeHash. // Its generic security strength is 128 bits against all attacks if at // least 32 bytes of its output are used. func NewShake128() ShakeHash { … } // NewShake256 creates a new SHAKE256 variable-output-length ShakeHash. // Its generic security strength is 256 bits against all attacks if // at least 64 bytes of its output are used. func NewShake256() ShakeHash { … } func newShake128Generic() *state { … } func newShake256Generic() *state { … } // NewCShake128 creates a new instance of cSHAKE128 variable-output-length ShakeHash, // a customizable variant of SHAKE128. // N is used to define functions based on cSHAKE, it can be empty when plain cSHAKE is // desired. S is a customization byte string used for domain separation - two cSHAKE // computations on same input with different S yield unrelated outputs. // When N and S are both empty, this is equivalent to NewShake128. func NewCShake128(N, S []byte) ShakeHash { … } // NewCShake256 creates a new instance of cSHAKE256 variable-output-length ShakeHash, // a customizable variant of SHAKE256. // N is used to define functions based on cSHAKE, it can be empty when plain cSHAKE is // desired. S is a customization byte string used for domain separation - two cSHAKE // computations on same input with different S yield unrelated outputs. // When N and S are both empty, this is equivalent to NewShake256. func NewCShake256(N, S []byte) ShakeHash { … } // ShakeSum128 writes an arbitrary-length digest of data into hash. func ShakeSum128(hash, data []byte) { … } // ShakeSum256 writes an arbitrary-length digest of data into hash. func ShakeSum256(hash, data []byte) { … }