mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Use OpenSSL::Digest instead of deprecated OpenSSL::Digest::Digest
This commit is contained in:
parent
d89564e7fe
commit
7000546b29
2 changed files with 4 additions and 4 deletions
|
@ -8,7 +8,7 @@ module Fog
|
|||
|
||||
service(:compute, 'cloudstack/compute','Compute')
|
||||
|
||||
@@digest = OpenSSL::Digest::Digest.new('sha1')
|
||||
@@digest = OpenSSL::Digest.new('sha1')
|
||||
|
||||
def self.escape(string)
|
||||
string = CGI::escape(string)
|
||||
|
|
|
@ -18,7 +18,7 @@ module Fog
|
|||
private
|
||||
|
||||
def setup_sha1
|
||||
@digest = OpenSSL::Digest::Digest.new('sha1')
|
||||
@digest = OpenSSL::Digest.new('sha1')
|
||||
@signer = lambda do |data|
|
||||
OpenSSL::HMAC.digest(@digest, @key, data)
|
||||
end
|
||||
|
@ -26,7 +26,7 @@ module Fog
|
|||
|
||||
def setup_sha256
|
||||
begin
|
||||
@digest = OpenSSL::Digest::Digest.new('sha256')
|
||||
@digest = OpenSSL::Digest.new('sha256')
|
||||
@signer = lambda do |data|
|
||||
OpenSSL::HMAC.digest(@digest, @key, data)
|
||||
end
|
||||
|
@ -45,4 +45,4 @@ module Fog
|
|||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue