summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-22 04:30:37 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-22 04:30:37 +0000
commit1ddf7d796af4b189768c3d5d0bedcb638481bb17 (patch)
tree8997ee9cfa1b456a418c9dcc88cec6188cb18bb9 /lib
parent5e85bd4e79e896311595124a68d8ca921932adf4 (diff)
merges r21996 from trunk into ruby_1_9_1.
* lib/net/imap.rb (hmac_md5): should use String#ord to get ascii code from the one-character string. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@22502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/net/imap.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/net/imap.rb b/lib/net/imap.rb
index 09b534929..d07dd4272 100644
--- a/lib/net/imap.rb
+++ b/lib/net/imap.rb
@@ -3151,8 +3151,8 @@ module Net
k_ipad = key + "\0" * (64 - key.length)
k_opad = key + "\0" * (64 - key.length)
for i in 0..63
- k_ipad[i] ^= 0x36
- k_opad[i] ^= 0x5c
+ k_ipad[i] = (k_ipad[i].ord ^ 0x36).chr
+ k_opad[i] = (k_opad[i].ord ^ 0x5c).chr
end
digest = Digest::MD5.digest(k_ipad + text)