提交 0a692e48 编写于 作者: J Jeremy Kemper

Use OpenSSL::Digest.const(...).new instead of OpenSSL::Digest::Digest.new(...)

上级 5d24827e
......@@ -53,7 +53,7 @@ def secure_compare(a, b)
def generate_digest(data)
require 'openssl' unless defined?(OpenSSL)
OpenSSL::HMAC.hexdigest(OpenSSL::Digest::Digest.new(@digest), @secret, data)
OpenSSL::HMAC.hexdigest(OpenSSL::Digest.const_get(@digest).new, @secret, data)
end
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册