Sha256: 510d2d23fd881de684543f6770b22a3d024aceb3048b4af915f43528d4b2db5b

Contents?: true

Size: 232 Bytes

Versions: 23

Compression:

Stored size: 232 Bytes

Contents

require 'openssl'

module RestCore; end
module RestCore::Hmac
  module_function
  def sha256 key, data
    OpenSSL::HMAC.digest('sha256', key, data)
  end

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

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rest-core-3.6.0 lib/rest-core/util/hmac.rb
rest-core-3.5.92 lib/rest-core/util/hmac.rb
rest-core-3.5.91 lib/rest-core/util/hmac.rb
rest-core-3.5.9 lib/rest-core/util/hmac.rb
rest-core-3.5.8 lib/rest-core/util/hmac.rb
rest-core-3.5.7 lib/rest-core/util/hmac.rb
rest-core-3.5.6 lib/rest-core/util/hmac.rb
rest-core-3.5.5 lib/rest-core/util/hmac.rb
rest-core-3.5.4 lib/rest-core/util/hmac.rb
rest-core-3.5.3 lib/rest-core/util/hmac.rb
rest-core-3.5.2 lib/rest-core/util/hmac.rb
rest-core-3.5.1 lib/rest-core/util/hmac.rb
rest-core-3.5.0 lib/rest-core/util/hmac.rb
rest-core-3.4.1 lib/rest-core/util/hmac.rb
rest-core-3.4.0 lib/rest-core/util/hmac.rb
rest-core-3.3.3 lib/rest-core/util/hmac.rb
rest-core-3.3.2 lib/rest-core/util/hmac.rb
rest-core-3.3.1 lib/rest-core/util/hmac.rb
rest-core-3.3.0 lib/rest-core/util/hmac.rb
rest-core-3.2.0 lib/rest-core/util/hmac.rb