Sha256: b45b51b157c56b2cb752dc324cefff2112cc73394c77bbbaab35d6663fbecf18
Contents?: true
Size: 379 Bytes
Versions: 6
Compression:
Stored size: 379 Bytes
Contents
require "oauth/signature/base" module OAuth::Signature::HMAC class SHA1 < OAuth::Signature::Base implements "hmac-sha1" def body_hash Base64.encode64(OpenSSL::Digest::SHA1.digest(request.body || "")).chomp.delete("\n") end private def digest OpenSSL::HMAC.digest(OpenSSL::Digest.new("sha1"), secret, signature_base_string) end end end
Version data entries
6 entries across 6 versions & 1 rubygems