directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1491453 - /directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/password/PasswordUtil.java
Date Mon, 10 Jun 2013 13:53:00 GMT
Author: pamarcelot
Date: Mon Jun 10 13:53:00 2013
New Revision: 1491453

URL: http://svn.apache.org/r1491453
Log:
Used the more appropriate getAlgorithm() method.

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=1491453&r1=1491452&r2=1491453&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
Mon Jun 10 13:53:00 2013
@@ -165,7 +165,7 @@ public class PasswordUtil
 
         if ( algorithm != null )
         {
-            sb.append( '{' ).append( algorithm.getName().toUpperCase() ).append( '}' );
+            sb.append( '{' ).append( algorithm.getAlgorithm().toUpperCase() ).append( '}'
);
 
             if ( algorithm == LdapSecurityConstants.HASH_METHOD_CRYPT )
             {
@@ -324,7 +324,7 @@ public class PasswordUtil
 
         try
         {
-            digest = MessageDigest.getInstance( algorithm.getName() );
+            digest = MessageDigest.getInstance( algorithm.getAlgorithm() );
         }
         catch ( NoSuchAlgorithmException e1 )
         {
@@ -357,7 +357,7 @@ public class PasswordUtil
      */
     public static byte[] splitCredentials( byte[] credentials, EncryptionMethod encryptionMethod
)
     {
-        int algoLength = encryptionMethod.getAlgorithm().getName().length() + 2;
+        int algoLength = encryptionMethod.getAlgorithm().getAlgorithm().length() + 2;
 
         switch ( encryptionMethod.getAlgorithm() )
         {



Mime
View raw message