Documentation ¶
Overview ¶
Package blake2b implements the BLAKE2b secure hashing algorithm with support for salting and personalization. BLAKE2b is optimized for 64-bit platforms and produces digests of any size between 1 and 64 bytes
Index ¶
Constants ¶
const ( // The length of the key field. KeyLength = 64 // The maximum number of bytes to produce. MaxOutput = 64 // Max size of the salt, in bytes SaltLength = 16 // Max size of the personalization string, in bytes SeparatorLength = 16 // Number of G function rounds for BLAKE2b. RoundCount = 12 // Size of a block buffer in bytes BlockSize = 128 // Initialization vector for BLAKE2b IV0 uint64 = 0x6a09e667f3bcc908 IV1 uint64 = 0xbb67ae8584caa73b IV2 uint64 = 0x3c6ef372fe94f82b IV3 uint64 = 0xa54ff53a5f1d36f1 IV4 uint64 = 0x510e527fade682d1 IV5 uint64 = 0x9b05688c2b3e6c1f IV6 uint64 = 0x1f83d9abfb41bd6b IV7 uint64 = 0x5be0cd19137e2179 )
The constant values will be different for other BLAKE2 variants. These are appropriate for BLAKE2b.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Digest ¶
type Digest struct {
// contains filtered or unexported fields
}
Digest represents the internal state of the BLAKE2b algorithm.
func NewDigest ¶
NewDigest constructs a new instance of a BLAKE2b hash with the provided configuration.
func (*Digest) BlockSize ¶
BlockSize returns the hash's underlying block size. The Write method must be able to accept any amount of data, but it may operate more efficiently if all writes are a multiple of the block size.