Class: HMAC::SHA1

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

Class Method Summary collapse

Class Method Details

.digest(key, text) ⇒ Object



13
14
15
# File 'lib/hmac.rb', line 13

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

.hexdigest(key, text) ⇒ Object



17
18
19
# File 'lib/hmac.rb', line 17

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