Documentation ¶
Overview ¶
Package blake2s implements the BLAKE2s secure hashing algorithm with support for salting and personalization. BLAKE2s is optimized for 8- to 32-bit platforms and produces digests of any size between 1 and 32 bytes
Index ¶
Constants ¶
const ( // The length of the key field. KeyLength = 32 // The maximum number of bytes to produce. MaxOutput = 32 // Max size of the salt, in bytes SaltLength = 8 // Max size of the personalization string, in bytes SeparatorLength = 8 // Number of G function rounds for BLAKE2s. RoundCount = 10 // Size of a block buffer in bytes BlockSize = 64 // Initialization vector for BLAKE2s IV0 uint32 = 0x6a09e667 IV1 uint32 = 0xbb67ae85 IV2 uint32 = 0x3c6ef372 IV3 uint32 = 0xa54ff53a IV4 uint32 = 0x510e527f IV5 uint32 = 0x9b05688c IV6 uint32 = 0x1f83d9ab IV7 uint32 = 0x5be0cd19 )
The constant values will be different for other BLAKE2 variants. These are appropriate for BLAKE2s.
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 BLAKE2s algorithm.
func NewDigest ¶
NewDigest constructs a new instance of a BLAKE2s 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.