You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by td...@apache.org on 2008/07/07 13:07:28 UTC
svn commit: r674450 -
/httpd/httpd/branches/2.2.x/docs/manual/misc/password_encryptions.xml
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>