lib/fog/aws/signaturev4.rb in fog-aws-0.1.1 vs lib/fog/aws/signaturev4.rb in fog-aws-0.1.2
- old
+ new
@@ -1,12 +1,12 @@
-require 'fog/aws/core'
-
# See http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html
+
module Fog
module AWS
class SignatureV4
ALGORITHM = 'AWS4-HMAC-SHA256'
+
def initialize(aws_access_key_id, secret_key, region, service)
@region = region
@service = service
@aws_access_key_id = aws_access_key_id
@hmac = Fog::HMAC.new('sha256', 'AWS4' + secret_key)
@@ -113,9 +113,8 @@
end
def signed_headers(headers)
headers.keys.map {|key| key.to_s.downcase}.sort.join(';')
end
-
end
end
end