package blake3
Import Path
lukechampine.com/blake3 (on go.dev)
Dependency Relation
imports 11 packages, and imported by one package
Involved Source Files
Package blake3 implements the BLAKE3 cryptographic hash function.
Package-Level Type Names (total 2)
Hasher implements hash.Hash.
BlockSize implements hash.Hash.
Reset implements hash.Hash.
Size implements hash.Hash.
Sum implements hash.Hash.
Write implements hash.Hash.
XOF returns an OutputReader initialized with the current hash state.
*Hasher : github.com/gogo/protobuf/proto.Sizer
*Hasher : github.com/miekg/dns.Writer
*Hasher : hash.Hash
*Hasher : internal/bisect.Writer
*Hasher : io.Writer
func New(size int, key []byte) *Hasher
An OutputReader produces an seekable stream of 2^64 - 1 pseudorandom output
bytes.
Read implements io.Reader. Callers may assume that Read returns len(p), nil
unless the read would extend beyond the end of the stream.
Seek implements io.Seeker.
*OutputReader : io.Reader
*OutputReader : io.ReadSeeker
*OutputReader : io.Seeker
func (*Hasher).XOF() *OutputReader
Package-Level Functions (total 9)
BaoDecode reads content and tree data from the provided reader(s), and
streams the verified content to dst.
Deprecated: Use bao.Decode instead.
BaoEncode computes the intermediate BLAKE3 tree hashes of data and writes
them to dst.
Deprecated: Use bao.Encode instead.
BaoEncodeBuf returns the Bao encoding and root (i.e. BLAKE3 hash) for data.
Deprecated: Use bao.EncodeBuf instead.
EncodedSize returns the size of a Bao encoding for the provided quantity
of data.
Deprecated: Use bao.EncodedSize instead.
BaoVerifyBuf verifies the Bao encoding and root (i.e. BLAKE3 hash) for data.
Deprecated: Use bao.VerifyBuf instead.
DeriveKey derives a subkey from ctx and srcKey. ctx should be hardcoded,
globally unique, and application-specific. A good format for ctx strings is:
[application] [commit timestamp] [purpose]
e.g.:
example.com 2019-12-25 16:18:03 session tokens v1
The purpose of these requirements is to ensure that an attacker cannot trick
two different applications into using the same context string.
New returns a Hasher for the specified digest size and key. If key is nil,
the hash is unkeyed. Otherwise, len(key) must be 32.
Sum256 returns the unkeyed BLAKE3 hash of b, truncated to 256 bits.
Sum512 returns the unkeyed BLAKE3 hash of b, truncated to 512 bits.
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |