class Cfh::Hasher

Hasher

Public Class Methods

create(person_hash, key_value) click to toggle source
# File lib/cfh/hasher.rb, line 4
def self.create(person_hash, key_value)
  hash_key = hasher(person_hash)
  data = {
    key_value: key_value,
    hash_key: hash_key
  }
  hasher(data)
end
hasher(data) click to toggle source
# File lib/cfh/hasher.rb, line 13
def self.hasher(data)
  data_json = JSON.pretty_generate(data)
  Digest::SHA256.hexdigest(data_json)
end