Class: Digest::BLAKE3
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Digest_Base
|
|
|
Instance Chain:
self,
Digest_Base
|
|
| Inherits: |
Digest_Base
|
| Defined in: | ext/digest/blake3/blake3init.c, ext/digest/blake3/blake3init.c |
Overview
A class for calculating message digests using the BLAKE3 hash function,
by Jack O'Connor, Jean-Philippe Aumasson, Samuel Neves, and Zooko
Wilcox-O'Hearn.
BLAKE3 produces a digest of 256 bits (32 bytes) by default.
Examples
require 'digest'
Compute a complete digest
Digest::BLAKE3.hexdigest 'abc' #=> "6437b3ac38465133ffb63b75273a8db548c558465d79db03fd359c6cd5bd9d85"
Compute digest by chunks
blake3 = Digest::BLAKE3.new # =>#Digest::BLAKE3 blake3.update "ab" blake3 << "c" # alias for #update blake3.hexdigest # => "6437b3ac..."
Use the same object to compute another digest
blake3.reset blake3 << "message" blake3.hexdigest
Constant Summary
-
LIBRARY_VERSION =
# File 'ext/digest/blake3/blake3init.c', line 92
The version of
BLAKE3libraryversion -
VERSION =
# File 'ext/digest/blake3/blake3init.c', line 87
The version of
BLAKE3version