diff --git a/lib/openid/cryptutil.rb b/lib/openid/cryptutil.rb index 7f672edf..cd505920 100644 --- a/lib/openid/cryptutil.rb +++ b/lib/openid/cryptutil.rb @@ -37,7 +37,7 @@ def CryptUtil.sha1(text) end def CryptUtil.hmac_sha1(key, text) - if Digest.const_defined? :HMAC + if Digest.const_defined? :HMAC Digest::HMAC.new(key,Digest::SHA1).update(text).digest else return HMAC::SHA1.digest(key, text) @@ -49,7 +49,7 @@ def CryptUtil.sha256(text) end def CryptUtil.hmac_sha256(key, text) - if Digest.const_defined? :HMAC + if Digest.const_defined? :HMAC Digest::HMAC.new(key,Digest::SHA256).update(text).digest else return HMAC::SHA256.digest(key, text)