directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1491761 - /directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/password/PasswordUtil.java
Date Tue, 11 Jun 2013 12:05:46 GMT
Author: pamarcelot
Date: Tue Jun 11 12:05:45 2013
New Revision: 1491761

URL: http://svn.apache.org/r1491761
Log:
Used 'prefix' rather than 'algorithm' which can differ in the case of salted hashing mechanisms.

Modified:
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/password/PasswordUtil.java

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/password/PasswordUtil.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/password/PasswordUtil.java?rev=1491761&r1=1491760&r2=1491761&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/password/PasswordUtil.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/password/PasswordUtil.java
Tue Jun 11 12:05:45 2013
@@ -165,7 +165,7 @@ public class PasswordUtil
 
         if ( algorithm != null )
         {
-            sb.append( '{' ).append( algorithm.getAlgorithm().toUpperCase() ).append( '}'
);
+            sb.append( '{' ).append( algorithm.getPrefix().toUpperCase() ).append( '}' );
 
             if ( algorithm == LdapSecurityConstants.HASH_METHOD_CRYPT )
             {
@@ -357,7 +357,7 @@ public class PasswordUtil
      */
     public static byte[] splitCredentials( byte[] credentials, EncryptionMethod encryptionMethod
)
     {
-        int algoLength = encryptionMethod.getAlgorithm().getAlgorithm().length() + 2;
+        int algoLength = encryptionMethod.getAlgorithm().getPrefix().length() + 2;
 
         switch ( encryptionMethod.getAlgorithm() )
         {



Mime
View raw message