go1.20.5
GoThrough

blake2b.BlockSize

// The blocksize of BLAKE2b in bytes. const BlockSize = 128

blake2b.OutputLengthUnknown

// OutputLengthUnknown can be used as the size argument to NewXOF to indicate // the length of the output is not known in advance. const OutputLengthUnknown = 0

blake2b.Size

// The hash size of BLAKE2b-512 in bytes. const Size = 64

blake2b.Size256

// The hash size of BLAKE2b-256 in bytes. const Size256 = 32

blake2b.Size384

// The hash size of BLAKE2b-384 in bytes. const Size384 = 48

blake2b.XOF

// XOF defines the interface to hash functions that // support arbitrary-length output. type XOF interface { // Write absorbs more data into the hash's state. It panics if called // after Read. io.Writer // Read reads more output from the hash. It returns io.EOF if the limit // has been reached. io.Reader // Clone returns a copy of the XOF in its current state. Clone() XOF // Reset resets the XOF to its initial state. Reset() }

blake2b.New

// New returns a new hash.Hash computing the BLAKE2b checksum with a custom length. // A non-nil key turns the hash into a MAC. The key must be between zero and 64 bytes long. // The hash size can be a value between 1 and 64 but it is highly recommended to use // values equal or greater than: // - 32 if BLAKE2b is used as a hash function (The key is zero bytes long). // - 16 if BLAKE2b is used as a MAC function (The key is at least 16 bytes long). // When the key is nil, the returned hash.Hash implements BinaryMarshaler // and BinaryUnmarshaler for state (de)serialization as documented by hash.Hash. func New(size int, key []byte) (hash.Hash, error)

blake2b.New256

// New256 returns a new hash.Hash computing the BLAKE2b-256 checksum. A non-nil // key turns the hash into a MAC. The key must be between zero and 64 bytes long. func New256(key []byte) (hash.Hash, error)

blake2b.New384

// New384 returns a new hash.Hash computing the BLAKE2b-384 checksum. A non-nil // key turns the hash into a MAC. The key must be between zero and 64 bytes long. func New384(key []byte) (hash.Hash, error)

blake2b.New512

// New512 returns a new hash.Hash computing the BLAKE2b-512 checksum. A non-nil // key turns the hash into a MAC. The key must be between zero and 64 bytes long. func New512(key []byte) (hash.Hash, error)

blake2b.NewXOF

// NewXOF creates a new variable-output-length hash. The hash either produce a // known number of bytes (1 <= size < 2**32-1), or an unknown number of bytes // (size == OutputLengthUnknown). In the latter case, an absolute limit of // 256GiB applies. // // A non-nil key turns the hash into a MAC. The key must between // zero and 32 bytes long. func NewXOF(size uint32, key []byte) (XOF, error)

blake2b.Sum256

// Sum256 returns the BLAKE2b-256 checksum of the data. func Sum256(data []byte) [Size256]byte

blake2b.Sum384

// Sum384 returns the BLAKE2b-384 checksum of the data. func Sum384(data []byte) [Size384]byte

blake2b.Sum512

// Sum512 returns the BLAKE2b-512 checksum of the data. func Sum512(data []byte) [Size]byte