diff options
| author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-11-01 05:01:43 +0000 |
|---|---|---|
| committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-11-01 05:01:43 +0000 |
| commit | 3949694f6351f0cf7a4b68d11667ca1c893de5e0 (patch) | |
| tree | 0f726e99112b363a7e9720fa50b339d7c72c1fc6 /ext/digest/lib | |
| parent | 8396dfdd9f50f662790a71d0f4199b1e701cab9d (diff) | |
| download | ruby-3949694f6351f0cf7a4b68d11667ca1c893de5e0.tar.gz ruby-3949694f6351f0cf7a4b68d11667ca1c893de5e0.tar.xz ruby-3949694f6351f0cf7a4b68d11667ca1c893de5e0.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@11254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/digest/lib')
| -rw-r--r-- | ext/digest/lib/digest/hmac.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/digest/lib/digest/hmac.rb b/ext/digest/lib/digest/hmac.rb index a6415a156..b42fef98d 100644 --- a/ext/digest/lib/digest/hmac.rb +++ b/ext/digest/lib/digest/hmac.rb @@ -69,7 +69,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 |
