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

[ruby/openssl] Look up digest by name instead of constant

b28fb2f05c
This commit is contained in:
Bart de Water 2020-04-19 11:14:36 -04:00 committed by Kazuki Yamaguchi
parent 3f8665fe0e
commit 0b2c70eaa1
31 changed files with 161 additions and 171 deletions

View file

@ -12,7 +12,7 @@ class OpenSSL::OSSL < OpenSSL::SSLTestCase
assert OpenSSL.fixed_length_secure_compare("aaa", "aaa")
assert OpenSSL.fixed_length_secure_compare(
OpenSSL::Digest::SHA256.digest("aaa"), OpenSSL::Digest::SHA256.digest("aaa")
OpenSSL::Digest.digest('SHA256', "aaa"), OpenSSL::Digest::SHA256.digest("aaa")
)
assert_raise(ArgumentError) { OpenSSL.fixed_length_secure_compare("aaa", "aaaa") }