Class: Noise::Functions::Hash::Sha256

Inherits:
Object
  • Object
show all
Defined in:
lib/noise/functions/hash/sha256.rb

Constant Summary collapse

HASHLEN =
32
BLOCKLEN =
64

Instance Method Summary collapse

Instance Method Details

#blocklenObject



17
18
19
# File 'lib/noise/functions/hash/sha256.rb', line 17

def blocklen
  BLOCKLEN
end

#hash(data) ⇒ Object



9
10
11
# File 'lib/noise/functions/hash/sha256.rb', line 9

def hash(data)
  RbNaCl::Hash.sha256(data)
end

#hashlenObject



13
14
15
# File 'lib/noise/functions/hash/sha256.rb', line 13

def hashlen
  HASHLEN
end