lib/adyen/encoding.rb in adyen-1.4.1 vs lib/adyen/encoding.rb in adyen-1.5.0
- old
+ new
@@ -5,17 +5,17 @@
module Adyen
module Encoding
def self.hmac_base64(hmac_key, message)
digest = OpenSSL::HMAC.digest(OpenSSL::Digest.new('sha1'), hmac_key, message)
- Base64.encode64(digest).strip
+ Base64.strict_encode64(digest).strip
end
def self.gzip_base64(message)
sio = StringIO.new
gz = Zlib::GzipWriter.new(sio)
gz.write(message)
gz.close
- Base64.encode64(sio.string).gsub("\n", "")
+ Base64.strict_encode64(sio.string)
end
end
end
\ No newline at end of file