1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Avoid deprecated OpenSSL::Digest constants

This commit is contained in:
Bart de Water 2020-06-28 17:18:34 -04:00 committed by Hiroshi SHIBATA
parent 1ce9c37257
commit 3621a7debf
Notes: git 2020-06-29 13:25:55 +09:00
4 changed files with 4 additions and 4 deletions

View file

@ -4,7 +4,7 @@ require 'openssl'
describe "OpenSSL::HMAC.digest" do
it "returns an SHA1 digest" do
cur_digest = OpenSSL::Digest::SHA1.new
cur_digest = OpenSSL::Digest.new("SHA1")
cur_digest.digest.should == HMACConstants::BlankSHA1Digest
digest = OpenSSL::HMAC.digest(cur_digest,
HMACConstants::Key,

View file

@ -4,7 +4,7 @@ require 'openssl'
describe "OpenSSL::HMAC.hexdigest" do
it "returns an SHA1 hex digest" do
cur_digest = OpenSSL::Digest::SHA1.new
cur_digest = OpenSSL::Digest.new("SHA1")
cur_digest.hexdigest.should == HMACConstants::BlankSHA1HexDigest
hexdigest = OpenSSL::HMAC.hexdigest(cur_digest,
HMACConstants::Key,