--- digestauth.rb.orig	2004-11-03 21:42:35.000000000 +
0900
+++ digestauth.rb	2004-11-03 21:44:06.000000000 +
0900
@@ -254,7 +254,7 @@
       def generate_next_nonc
e(req)
         now = "%012d" % req.request_time.to_i
         pk  = hexdigest(now, @instance_key)[0,32]
-  
      nonce = encode64(now + ":" + pk).chop # it has 6
0 length of chars.
+        nonce = Base64.encode64(no
w + ":" + pk).chop # it has 60 length of chars.
      
   nonce
       end
 
@@ -262,7 +262,7 @@
         use
rname = auth_req['username']
         nonce = auth_req
['nonce']
 
-        pub_time, pk = decode64(nonce).sp
lit(":", 2)
+        pub_time, pk = Base64.decode64(no
nce).split(":", 2)
         if (!pub_time || !pk)
    
       error("%s: empty nonce is given", username)
   
        return false