Documentation
¶
Overview ¶
Package blake3 provides Blake3 hash functions for cryptographic operations. This is extracted from the threshold package to provide a centralized implementation for all Lux projects.
Index ¶
- Constants
- type Digest
- type Hasher
- func (h *Hasher) Clone() *Hasher
- func (h *Hasher) Digest() Digest
- func (h *Hasher) Reader() io.Reader
- func (h *Hasher) Reset()
- func (h *Hasher) Sum(b []byte) []byte
- func (h *Hasher) Write(p []byte) (n int, err error)
- func (h *Hasher) WriteBigInt(n *big.Int)
- func (h *Hasher) WriteString(s string) (n int, err error)
- func (h *Hasher) WriteUint32(v uint32)
- func (h *Hasher) WriteUint64(v uint64)
Constants ¶
const DigestLength = 64 // 512 bits
DigestLength is the standard output length for Blake3 hashes
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Digest ¶
type Digest [DigestLength]byte
Digest represents a Blake3 hash output
func HashWithDomain ¶
HashWithDomain hashes data with a domain separator
type Hasher ¶
type Hasher struct {
// contains filtered or unexported fields
}
Hasher wraps blake3.Hasher to provide a consistent interface
func NewWithDomain ¶
NewWithDomain creates a new Blake3 hasher with a domain separator
func (*Hasher) WriteBigInt ¶
WriteBigInt adds a big.Int to the hash
func (*Hasher) WriteString ¶
WriteString adds a string to the hash
func (*Hasher) WriteUint32 ¶
WriteUint32 adds a uint32 to the hash in big-endian format
func (*Hasher) WriteUint64 ¶
WriteUint64 adds a uint64 to the hash in big-endian format