qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhupend...@apache.org
Subject svn commit: r527556 - /incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/sasl/UsernameHashedPasswordCallbackHandler.java
Date Wed, 11 Apr 2007 16:07:59 GMT
Author: bhupendrab
Date: Wed Apr 11 09:07:58 2007
New Revision: 527556

URL: http://svn.apache.org/viewvc?view=rev&rev=527556
Log:
synchronized with hash mechanism used in Broker

Modified:
    incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/sasl/UsernameHashedPasswordCallbackHandler.java

Modified: incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/sasl/UsernameHashedPasswordCallbackHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/sasl/UsernameHashedPasswordCallbackHandler.java?view=diff&rev=527556&r1=527555&r2=527556
==============================================================================
--- incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/sasl/UsernameHashedPasswordCallbackHandler.java
(original)
+++ incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/sasl/UsernameHashedPasswordCallbackHandler.java
Wed Apr 11 09:07:58 2007
@@ -65,7 +65,6 @@
 
     private char[] getHash(String text) throws NoSuchAlgorithmException, UnsupportedEncodingException
     {
-
         byte[] data = text.getBytes("utf-8");
 
         MessageDigest md = MessageDigest.getInstance("MD5");
@@ -77,13 +76,12 @@
 
         byte[] digest = md.digest();
 
-        char[] hash = new char[digest.length + 1];
+        char[] hash = new char[digest.length ];
 
         int index = 0;
         for (byte b : digest)
-        {
-            index++;
-            hash[index] = (char) b;
+        {            
+            hash[index++] = (char) b;
         }
 
         return hash;



Mime
View raw message