module DoorMat::Crypto::FastHash

Public Class Methods

sha256(data) click to toggle source
# 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

Private Instance Methods

sha256(data) click to toggle source
# 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