From 0d1513fa3d103a2f1976e359e85092f550ece3ed Mon Sep 17 00:00:00 2001 From: yugui Date: Sun, 22 Feb 2009 04:30:37 +0000 Subject: 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: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/net/imap.rb | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 97c41063b2..130730aab3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Feb 3 12:09:08 2009 Shugo Maeda + + * lib/net/imap.rb (hmac_md5): should use String#ord to get ascii + code from the one-character string. + Mon Feb 2 17:05:55 2009 Nobuyoshi Nakada * file.c (rb_find_file_ext): should not be infected from other diff --git a/lib/net/imap.rb b/lib/net/imap.rb index 09b5349298..d07dd42722 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) -- cgit v1.2.3