Documentation
¶
Index ¶
Constants ¶
View Source
const ( BlockSize = 128 // block size of algorithm Size = 64 // maximum digest size SaltSize = 16 // maximum salt size PersonSize = 16 // maximum personalization string size KeySize = 64 // maximum size of key )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BLAKE2xb ¶
type BLAKE2xb struct {
// contains filtered or unexported fields
}
func (*BLAKE2xb) Read ¶
Read reads output of BLAKE2xb XOF. It returns io.EOF if the end of XOF output is reached.
type Config ¶
type Config struct {
Size uint8 // digest size (if zero, default size of 64 bytes is used)
Key []byte // key for prefix-MAC
Salt []byte // salt (if < 16 bytes, padded with zeros)
Person []byte // personalization (if < 16 bytes, padded with zeros)
Tree *Tree // parameters for tree hashing
}
Config is used to configure hash function parameters and keying. All parameters are optional.
type Tree ¶
type Tree struct {
Fanout uint8 // fanout
MaxDepth uint8 // maximal depth
LeafSize uint32 // leaf maximal byte length (0 for unlimited)
NodeOffset uint32 // node offset (0 for first, leftmost or leaf)
XOFLength uint32 // XOF digest length
NodeDepth uint8 // node depth (0 for leaves)
InnerHashSize uint8 // inner hash byte length
IsLastNode bool // indicates processing of the last node of layer
}
Tree represents parameters for tree hashing.
Click to show internal directories.
Click to hide internal directories.