Class: HMAC::SHA256

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

Class Method Summary collapse

Class Method Details

.digest(key, text) ⇒ Object



23
24
25
# File 'lib/hmac.rb', line 23

def self.digest(key,text)
  OpenSSL::HMAC.digest('sha256', key, text)
end

.hexdigest(key, text) ⇒ Object



27
28
29
# File 'lib/hmac.rb', line 27

def self.hexdigest(key,text)
  OpenSSL::HMAC.hexdigest('sha256', key, text)
end