Module: DoorMat::Crypto::FastHash

Defined in:
lib/door_mat/crypto/fast_hash.rb

Class Method Summary collapse

Class Method Details

.sha256(data) ⇒ Object



7
8
9
10
11
12
# File 'lib/door_mat/crypto/fast_hash.rb', line 7

def sha256(data)
  sha256 = OpenSSL::Digest::SHA256.new
  Base64.urlsafe_encode64(
    sha256.digest(data.to_str)
  )
end