Class: Noise::Functions::Hash::Blake3
- Inherits:
-
Object
- Object
- Noise::Functions::Hash::Blake3
- Defined in:
- lib/noise/functions/hash/blake3.rb
Constant Summary collapse
- HASHLEN =
32- BLOCKLEN =
64
Instance Method Summary collapse
- #blocklen ⇒ Object
- #hash(data) ⇒ Object
- #hashlen ⇒ Object
-
#initialize ⇒ Blake3
constructor
A new instance of Blake3.
Constructor Details
#initialize ⇒ Blake3
Returns a new instance of Blake3.
12 13 14 |
# File 'lib/noise/functions/hash/blake3.rb', line 12 def initialize Noise.optional_dependency!('blake3') end |
Instance Method Details
#blocklen ⇒ Object
24 25 26 |
# File 'lib/noise/functions/hash/blake3.rb', line 24 def blocklen BLOCKLEN end |
#hash(data) ⇒ Object
16 17 18 |
# File 'lib/noise/functions/hash/blake3.rb', line 16 def hash(data) ::Blake3.digest(data) end |
#hashlen ⇒ Object
20 21 22 |
# File 'lib/noise/functions/hash/blake3.rb', line 20 def hashlen HASHLEN end |