summaryrefslogtreecommitdiff
path: root/lib/net/pop.rb
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-17 18:39:43 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-17 18:39:43 +0000
commit3e51a5b1b5a953e4705adc924355ffdc83b25472 (patch)
treebe35b23555d126828b03f9969c7dca0861fa0017 /lib/net/pop.rb
parent35e731649da88fda916509eb1cb0a745d772f21c (diff)
o protocol.rb: Protocol#start yields self
o smtp.rb: use Socket.gethostname to get localhost name p pop.rb: use MD5#hexdigest git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/pop.rb')
-rw-r--r--lib/net/pop.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/net/pop.rb b/lib/net/pop.rb
index 046763e0a8..a6c002ce0c 100644
--- a/lib/net/pop.rb
+++ b/lib/net/pop.rb
@@ -337,20 +337,14 @@ Net::POP3
end
- def auth( acnt, pass )
+ def auth( account, pass )
critical {
- @socket.writeline( "APOP #{acnt} #{digest(@stamp + pass)}" )
+ @socket.writeline sprintf( 'APOP %s %s',
+ account, MD5.new(@stamp + pass).hexdigest )
check_reply_auth
}
end
-
- def digest( str )
- ret = ''
- MD5.new( str ).digest.each_byte {|i| ret << sprintf('%02x', i) }
- ret
- end
-
end
end