class

Crypto::Digest::BLAKE2b

Inherits Digest < Reference < Object

BLAKE2b, a cryptographically secure hash based on the ideas of ChaCha20.

See Crystal API docs for details on how to use Digest interface

Constructors

new(hash_size : Int32 = 64, key : Bytes | Nil = nil)

Initializes Digest with given parameters

hash_size - Length of hash, in bytes. Must be between 1 and 64. Anything below 32 is discouraged when using BLAKE2b as a general-purpose hash function. key - Some secret key. When uniformly random, one cannot predict the final hash without it.

Source

Instance methods

digest_size

Returns the digest output size in bytes.

Source
final_impl(dst : Bytes) : Nil

Stores the output digest of #digest_size bytes in dst.

Source
reset_impl

Resets the object to it's initial state.

Source
update_impl(data : Bytes) : Nil

Hashes data incrementally.

Source