Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit 05d202c

Browse files
committed
Merge pull request #83 from tobiashm/patch-1
Avoid checking ancestors for constant
2 parents 197d002 + e7e9f81 commit 05d202c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/openid/cryptutil.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def CryptUtil.sha1(text)
3737
end
3838

3939
def CryptUtil.hmac_sha1(key, text)
40-
if Digest.const_defined? :HMAC
40+
if Digest.const_defined? :HMAC, false
4141
Digest::HMAC.new(key,Digest::SHA1).update(text).digest
4242
else
4343
return HMAC::SHA1.digest(key, text)
@@ -49,7 +49,7 @@ def CryptUtil.sha256(text)
4949
end
5050

5151
def CryptUtil.hmac_sha256(key, text)
52-
if Digest.const_defined? :HMAC
52+
if Digest.const_defined? :HMAC, false
5353
Digest::HMAC.new(key,Digest::SHA256).update(text).digest
5454
else
5555
return HMAC::SHA256.digest(key, text)

0 commit comments

Comments
 (0)