Module: RestCore::Hmac

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

Class Method Summary (collapse)

Class Method Details

+ (Object) sha1(key, data)



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

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

+ (Object) sha256(key, data)



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

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