* 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/trunk@21996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0f9422ef23
commit
bb9435a75c
@ -1,3 +1,8 @@
|
|||||||
|
Tue Feb 3 12:09:08 2009 Shugo Maeda <shugo@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/net/imap.rb (hmac_md5): should use String#ord to get ascii
|
||||||
|
code from the one-character string.
|
||||||
|
|
||||||
Tue Feb 3 11:25:41 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Feb 3 11:25:41 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* load.c (load_lock): warn for circular require. [ruby-core:20794],
|
* load.c (load_lock): warn for circular require. [ruby-core:20794],
|
||||||
|
@ -3151,8 +3151,8 @@ module Net
|
|||||||
k_ipad = key + "\0" * (64 - key.length)
|
k_ipad = key + "\0" * (64 - key.length)
|
||||||
k_opad = key + "\0" * (64 - key.length)
|
k_opad = key + "\0" * (64 - key.length)
|
||||||
for i in 0..63
|
for i in 0..63
|
||||||
k_ipad[i] ^= 0x36
|
k_ipad[i] = (k_ipad[i].ord ^ 0x36).chr
|
||||||
k_opad[i] ^= 0x5c
|
k_opad[i] = (k_opad[i].ord ^ 0x5c).chr
|
||||||
end
|
end
|
||||||
|
|
||||||
digest = Digest::MD5.digest(k_ipad + text)
|
digest = Digest::MD5.digest(k_ipad + text)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user