Commit 99d804b5 authored by Thomas J. Donovan's avatar Thomas J. Donovan
Browse files

correct the digest password Java example code - doc PR 45340

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@674445 13f79535-47bb-0310-9956-ffa450edef68
parent 05a94f6e
Loading
Loading
Loading
Loading
+2 −2
Changes for docs/manual/misc/password_encryptions.xml: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -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>