Class: Hashtastic::DictionaryHasher

Inherits:
Object
  • Object
show all
Defined in:
lib/hashtastic/dictionary_hasher.rb

Class Method Summary collapse

Class Method Details

.call(dictionary, filter = []) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/hashtastic/dictionary_hasher.rb', line 6

def call(dictionary, filter = [])
  encoded_message = Digester.call(dictionary, filter)

  hasher = Digest::SHA3.new(256)

  hasher.update(encoded_message)

  hasher.hexdigest
end