Module: Blake3

Defined in:
lib/blake3.rb,
lib/blake3/version.rb

Defined Under Namespace

Classes: Hasher

Constant Summary collapse

VERSION =
'0.1.3'

Class Method Summary collapse

Class Method Details

.derive_key(context, input_key) ⇒ Object



19
20
21
22
# File 'lib/blake3.rb', line 19

def derive_key(context, input_key)
  hex = input_key.unpack1('H*')
  Blake3Key.new.derive(context, hex)
end

.digest(plain, key: nil) ⇒ Object



15
16
17
# File 'lib/blake3.rb', line 15

def digest(plain, key: nil)
  Hasher.digest(plain, key: key)
end

.hexdigest(plain, key: nil) ⇒ Object



11
12
13
# File 'lib/blake3.rb', line 11

def hexdigest(plain, key: nil)
  Hasher.hexdigest(plain, key: key)
end