Class: Filespot::Digest
- Inherits:
-
Object
- Object
- Filespot::Digest
- Defined in:
- lib/filespot/digest.rb
Class Method Summary collapse
Class Method Details
.hmac(http_method, uri) ⇒ Object
6 7 8 9 |
# File 'lib/filespot/digest.rb', line 6 def self.hmac(http_method, uri) data = "#{http_method.upcase}+#{URI.decode(uri).gsub('http://', '')}" OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), Filespot.apikey, data) end |