summaryrefslogtreecommitdiff
path: root/lib/webrick/httpauth
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-03 13:29:42 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-03 13:29:42 +0000
commite9fb2e27313331240a9576954d3f59cbab2443d8 (patch)
tree784c1a650886991445fe980a37a107accce00cbf /lib/webrick/httpauth
parentff861c0c7d88c7e5cf5fc4c4c1bceadb3bd0622b (diff)
* lib/webrick/httpauth/digestauth.rb: use Base64.encode64 to
avoid warnings. [webrickja:128] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/webrick/httpauth')
-rw-r--r--lib/webrick/httpauth/digestauth.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/webrick/httpauth/digestauth.rb b/lib/webrick/httpauth/digestauth.rb
index 2b0660ed29..05a6f192c3 100644
--- a/lib/webrick/httpauth/digestauth.rb
+++ b/lib/webrick/httpauth/digestauth.rb
@@ -254,7 +254,7 @@ module WEBrick
def generate_next_nonce(req)
now = "%012d" % req.request_time.to_i
pk = hexdigest(now, @instance_key)[0,32]
- nonce = encode64(now + ":" + pk).chop # it has 60 length of chars.
+ nonce = Base64.encode64(now + ":" + pk).chop # it has 60 length of chars.
nonce
end
@@ -262,7 +262,7 @@ module WEBrick
username = auth_req['username']
nonce = auth_req['nonce']
- pub_time, pk = decode64(nonce).split(":", 2)
+ pub_time, pk = Base64.decode64(nonce).split(":", 2)
if (!pub_time || !pk)
error("%s: empty nonce is given", username)
return false