Module: RestCore::Hmac

Defined in:
lib/rest-core/util/hmac.rb

Class Method Summary collapse

Class Method Details

.sha1(key, data) ⇒ Object



11
12
13
# File 'lib/rest-core/util/hmac.rb', line 11

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

.sha256(key, data) ⇒ Object



7
8
9
# File 'lib/rest-core/util/hmac.rb', line 7

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