summaryrefslogtreecommitdiff
path: root/lib/webrick
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
commit77d3f40c90ca3c28c8fa2ad3456f49c07a535267 (patch)
tree91b7020ebefc87611e27bb84ae037b777f1364a1 /lib/webrick
parentcfc8755fafda7339ed48aba960f01e7fb9c1e560 (diff)
* lib/webrick/httpauth/digestauth.rb: use Base64.encode64 to
avoid warnings. [webrickja:128] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/webrick')
-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