Documentation ¶
Overview ¶
Package blake2b implemnets the BLAKE2b hash algorithm as defined in RFC 7693.
RFC 7693 defines BALKE2b-160 with 160 bit hash size, but it's recommend to use hash sizes >= 256 bit to prevent birthday attacks.
Index ¶
- Constants
- func New160(key []byte) (hash.Hash, error)
- func New256(key []byte) (hash.Hash, error)
- func New384(key []byte) (hash.Hash, error)
- func New512(key []byte) (hash.Hash, error)
- func Sum160(data []byte) [Size160]byte
- func Sum256(data []byte) [Size256]byte
- func Sum384(data []byte) [Size384]byte
- func Sum512(data []byte) [Size]byte
Constants ¶
const ( // BlockSize is the blocksize of BLAKE2b in bytes. BlockSize = 128 // Size is the hash size of BLAKE2b-512 in bytes. Size = 64 // Size384 is the hash size of BLAKE2b-384 in bytes. Size384 = 48 // Size256 is the hash size of BLAKE2b-256 in bytes. Size256 = 32 // Size160 is the hash size of BLAKE2b-160 in bytes. Size160 = 20 )
Variables ¶
This section is empty.
Functions ¶
func New160 ¶
New160 returns a new hash.Hash computing the BLAKE2b-160 checksum. A non-nil key turns the hash into a MAC. The key must between 0 and 64 byte.
func 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 between 0 and 64 byte.
func 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 between 0 and 64 byte.
func 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 between 0 and 64 byte.
Types ¶
This section is empty.