mirror of
https://github.com/ruby/ruby.git
synced 2025-09-23 20:44:00 +02:00
* ext/digest/lib/digest/hmac.rb (Digest::HMAC::update): Minor
optimization. * ext/digest/digest.c (rb_digest_instance_equal): Allow comparing a digest instance with another of a different class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
70aa19b6c6
commit
dd937ba9dc
3 changed files with 14 additions and 5 deletions
|
@ -67,7 +67,8 @@ module Digest
|
|||
end
|
||||
|
||||
def update(text)
|
||||
@md.reset.update(@opad + @md.digest(@ipad + text))
|
||||
# @md is reset when digest() returns
|
||||
@md.update(@opad + @md.digest(@ipad + text))
|
||||
self
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue