Documentation
¶
Index ¶
- Constants
- func Bytepad(x []byte, w int) []byte
- func EncodeString(data []byte) []byte
- func LeftEncode(x uint64) []byte
- func ParallelHash128(msg []byte, blockSize int, customization []byte, outLen int) ([]byte, error)
- func ParallelHash256(msg []byte, blockSize int, customization []byte, outLen int) ([]byte, error)
- func RightEncode(x uint64) []byte
- func SumFixed(rate int, ds byte, out, msg []byte)
- func TupleHash128(tuple [][]byte, customization []byte, outLen int) ([]byte, error)
- func TupleHash256(tuple [][]byte, customization []byte, outLen int) ([]byte, error)
- type Sponge
Constants ¶
const MaxRate = 168
Variables ¶
This section is empty.
Functions ¶
func EncodeString ¶
EncodeString encodes a byte string per SP 800-185.
func LeftEncode ¶
LeftEncode encodes the input integer x following the SP 800-185 definition.
func ParallelHash128 ¶
ParallelHash128 computes ParallelHash-128 over msg using the given blockSize and customization, producing outLen bytes of output.
func ParallelHash256 ¶
ParallelHash256 computes ParallelHash-256 over msg using the given blockSize and customization.
func RightEncode ¶
RightEncode encodes the input integer x following the SP 800-185 definition.
func SumFixed ¶
SumFixed absorbs msg into a fresh Keccak sponge with the provided parameters and squeezes a fixed-length digest into out. The domain separation byte must follow the conventions from NIST FIPS 202.
func TupleHash128 ¶
TupleHash128 computes the TupleHash-128 digest over the provided tuple, using the optional customization string. The output length is measured in bytes.