class

Blake3::Hasher

Inherits Reference < Object

Constructors

new(key : Bytes)

Keyed hashing – key must be exactly 32 bytes

Source
new

Unkeyed hashing

Source
new(*, context : String)

Key derivation context

Source

Class methods

derive_key(context : String, key_material = "") : Bytes
Source
digest(data) : Bytes

--- Class convenience methods ---

Source
hexdigest(data) : String
Source
keyed_digest(key : Bytes, data) : Bytes
Source

Instance methods

digest

Alias

Source
finalize_hash(output_len : Int32) : Bytes

Extended‑output (XOF) – for lengths other than 32

Source
finalize_hash

Standard 32‑byte digest – uses the safe, well‑tested C function

Source
hexdigest

Hex string of the default digest

Source
update(data : Bytes) : self

Feed raw bytes

Source
update(data : String) : self

Convenience for strings

Source