blake2b

package
v2.2.4+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2017 License: MIT, BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package blake2b implements the BLAKE2b hash algorithm as defined in RFC 7693.

Index

Constants

View Source
const (
	// The blocksize of BLAKE2b in bytes.
	BlockSize = 128
	// The hash size of BLAKE2b-512 in bytes.
	Size = 64
	// The hash size of BLAKE2b-384 in bytes.
	Size384 = 48
	// The hash size of BLAKE2b-256 in bytes.
	Size256 = 32
)

Variables

This section is empty.

Functions

func New256

func New256(key []byte) (hash.Hash, error)

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 zero and 64 bytes long.

func New384

func New384(key []byte) (hash.Hash, error)

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 zero and 64 bytes long.

func New512

func New512(key []byte) (hash.Hash, error)

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 zero and 64 bytes long.

func Sum256

func Sum256(data []byte) [Size256]byte

Sum256 returns the BLAKE2b-256 checksum of the data.

func Sum384

func Sum384(data []byte) [Size384]byte

Sum384 returns the BLAKE2b-384 checksum of the data.

func Sum512

func Sum512(data []byte) [Size]byte

Sum512 returns the BLAKE2b-512 checksum of the data.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL