summaryrefslogtreecommitdiff
path: root/ext/openssl/lib/openssl.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/lib/openssl.rb')
-rw-r--r--ext/openssl/lib/openssl.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/openssl/lib/openssl.rb b/ext/openssl/lib/openssl.rb
index 00e2db1f40..b047485785 100644
--- a/ext/openssl/lib/openssl.rb
+++ b/ext/openssl/lib/openssl.rb
@@ -31,8 +31,8 @@ module OpenSSL
# the length of the secret. Returns +true+ if the strings are identical,
# +false+ otherwise.
def self.secure_compare(a, b)
- hashed_a = OpenSSL::Digest::SHA256.digest(a)
- hashed_b = OpenSSL::Digest::SHA256.digest(b)
+ hashed_a = OpenSSL::Digest.digest('SHA256', a)
+ hashed_b = OpenSSL::Digest.digest('SHA256', b)
OpenSSL.fixed_length_secure_compare(hashed_a, hashed_b) && a == b
end
end