httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tdono...@apache.org
Subject svn commit: r674450 - /httpd/httpd/branches/2.2.x/docs/manual/misc/password_encryptions.xml
Date Mon, 07 Jul 2008 11:07:28 GMT
Author: tdonovan
Date: Mon Jul  7 04:07:28 2008
New Revision: 674450

URL: http://svn.apache.org/viewvc?rev=674450&view=rev
Log:
correct the digest password Java example code - doc PR 45340, from trunk r674445

Modified:
    httpd/httpd/branches/2.2.x/docs/manual/misc/password_encryptions.xml

Modified: httpd/httpd/branches/2.2.x/docs/manual/misc/password_encryptions.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/misc/password_encryptions.xml?rev=674450&r1=674449&r2=674450&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/docs/manual/misc/password_encryptions.xml (original)
+++ httpd/httpd/branches/2.2.x/docs/manual/misc/password_encryptions.xml Mon Jul  7 04:07:28
2008
@@ -182,9 +182,9 @@
       
       <example><title>Java</title>
       byte b[] = java.security.MessageDigest.getInstance("MD5").digest( (user + ":" + realm
+ ":" + password ).getBytes());<br />
-      java.math.BigInteger bi = new java.math.BigInteger(b);<br />
+      java.math.BigInteger bi = new java.math.BigInteger(1, b);<br />
       String s = bi.toString(16);<br />
-      if (s.length() % 2 != 0)<br />
+      while (s.length() < 32)<br />
       <indent>
         s = "0" + s;
       </indent>



Mime
View raw message