Documentation ¶
Overview ¶
Package blake3 implements the BLAKE3 cryptographic hash function.
Index ¶
- func BaoDecode(dst io.Writer, data, outboard io.Reader, root [32]byte) (bool, error)deprecated
- func BaoEncode(dst io.WriterAt, data io.Reader, dataLen int64, outboard bool) ([32]byte, error)deprecated
- func BaoEncodeBuf(data []byte, outboard bool) ([]byte, [32]byte)deprecated
- func BaoEncodedSize(dataLen int, outboard bool) intdeprecated
- func BaoVerifyBuf(data, outboard []byte, root [32]byte) booldeprecated
- func DeriveKey(subKey []byte, ctx string, srcKey []byte)
- func Sum256(b []byte) (out [32]byte)
- func Sum512(b []byte) (out [64]byte)
- type Hasher
- type OutputReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaoEncodeBuf
deprecated
func BaoEncodedSize
deprecated
func BaoVerifyBuf
deprecated
func DeriveKey ¶
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.
Types ¶
type Hasher ¶
type Hasher struct {
// contains filtered or unexported fields
}
Hasher implements hash.Hash.
func New ¶
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.
func (*Hasher) XOF ¶
func (h *Hasher) XOF() *OutputReader
XOF returns an OutputReader initialized with the current hash state.
type OutputReader ¶
type OutputReader struct {
// contains filtered or unexported fields
}
An OutputReader produces an seekable stream of 2^64 - 1 pseudorandom output bytes.
Directories ¶
Path | Synopsis |
---|---|
Package bao implements BLAKE3 verified streaming.
|
Package bao implements BLAKE3 verified streaming. |
Package guts provides a low-level interface to the BLAKE3 cryptographic hash function.
|
Package guts provides a low-level interface to the BLAKE3 cryptographic hash function. |