diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-12-01 14:07:01 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-12-01 14:07:01 +0000 |
commit | 31e15f76063304e4bcffb3c6c5e7b28d26cc44e5 (patch) | |
tree | b356ffec163f79faf0c3a7c980f459d24077b941 /lib/net/smtp.rb | |
parent | 3dfb98cea26048453641e0f3e5f795d9568420d4 (diff) | |
download | ruby-31e15f76063304e4bcffb3c6c5e7b28d26cc44e5.tar.gz |
Reflect the update of the MD5 module which is now Digest::MD5.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/smtp.rb')
-rw-r--r-- | lib/net/smtp.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/net/smtp.rb b/lib/net/smtp.rb index 05f5a20b49..2ae42c6551 100644 --- a/lib/net/smtp.rb +++ b/lib/net/smtp.rb @@ -192,7 +192,7 @@ SMTP objects raise these exceptions: =end require 'net/protocol' -require 'md5' +require 'digest/md5' module Net @@ -318,7 +318,7 @@ module Net critical { rep = getok( 'AUTH CRAM-MD5', ContinueCode ) challenge = rep.msg.split(' ')[1].unpack('m')[0] - secret = MD5.new( secret ).digest if secret.size > 64 + secret = Digest::MD5.digest( secret ) if secret.size > 64 isecret = secret + "\0" * (64 - secret.size) osecret = isecret.dup @@ -326,8 +326,8 @@ module Net isecret[i] ^= 0x36 osecret[i] ^= 0x5c end - tmp = MD5.new( isecret + challenge ).digest - tmp = MD5.new( osecret + tmp ).hexdigest + tmp = Digest::MD5.digest( isecret + challenge ) + tmp = Digest::MD5.hexdigest( osecret + tmp ) getok [user + ' ' + tmp].pack('m').chomp } |