directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r376623 [21/38] - in /directory/sandbox/akarasulu/rc1/apacheds: core-plugin/src/main/java/org/apache/directory/server/core/tools/schema/ core-plugin/src/test/java/org/apache/directory/server/core/tools/schema/ core-shared/src/main/java/org/...
Date Fri, 10 Feb 2006 10:49:57 GMT
Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/referral/ReferralLutTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/referral/ReferralLutTest.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/referral/ReferralLutTest.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/referral/ReferralLutTest.java Fri Feb 10 02:48:07 2006
@@ -34,24 +34,108 @@
  */
 public class ReferralLutTest extends TestCase
 {
-    public void testNullLimits() 
+    public void testNullLimits()
     {
         ReferralLut lut = new ReferralLut();
-        try { lut.isReferral( ( String ) null ); fail( "can't get here" ); } catch( IllegalArgumentException e ) {}
-        try { lut.isReferral( ( Name ) null ); fail( "can't get here" ); } catch( IllegalArgumentException e ) {}
-        try { lut.getFarthestReferralAncestor( ( Name ) null ); fail( "can't get here" ); } catch( IllegalArgumentException e ) {}
-        try { lut.getNearestReferralAncestor( ( Name ) null ); fail( "can't get here" ); } catch( IllegalArgumentException e ) {}
-        try { lut.referralAdded( ( Name ) null ); fail( "can't get here" ); } catch( IllegalArgumentException e ) {}
-        try { lut.referralAdded( ( String ) null ); fail( "can't get here" ); } catch( IllegalArgumentException e ) {}
-        try { lut.referralDeleted( ( Name ) null ); fail( "can't get here" ); } catch( IllegalArgumentException e ) {}
-        try { lut.referralDeleted( ( String ) null ); fail( "can't get here" ); } catch( IllegalArgumentException e ) {}
-        try { lut.referralChanged( ( Name ) null, ( Name ) null ); fail( "can't get here" ); } catch( IllegalArgumentException e ) {}
-        try { lut.referralChanged( ( String ) null, ( String ) null ); fail( "can't get here" ); } catch( IllegalArgumentException e ) {}
-        try { lut.referralChanged( ( Name ) null, ( String ) null ); fail( "can't get here" ); } catch( IllegalArgumentException e ) {}
-        try { lut.referralChanged( ( String ) null, ( Name ) null ); fail( "can't get here" ); } catch( IllegalArgumentException e ) {}
+        try
+        {
+            lut.isReferral( ( String ) null );
+            fail( "can't get here" );
+        }
+        catch ( IllegalArgumentException e )
+        {
+        }
+        try
+        {
+            lut.isReferral( ( Name ) null );
+            fail( "can't get here" );
+        }
+        catch ( IllegalArgumentException e )
+        {
+        }
+        try
+        {
+            lut.getFarthestReferralAncestor( ( Name ) null );
+            fail( "can't get here" );
+        }
+        catch ( IllegalArgumentException e )
+        {
+        }
+        try
+        {
+            lut.getNearestReferralAncestor( ( Name ) null );
+            fail( "can't get here" );
+        }
+        catch ( IllegalArgumentException e )
+        {
+        }
+        try
+        {
+            lut.referralAdded( ( Name ) null );
+            fail( "can't get here" );
+        }
+        catch ( IllegalArgumentException e )
+        {
+        }
+        try
+        {
+            lut.referralAdded( ( String ) null );
+            fail( "can't get here" );
+        }
+        catch ( IllegalArgumentException e )
+        {
+        }
+        try
+        {
+            lut.referralDeleted( ( Name ) null );
+            fail( "can't get here" );
+        }
+        catch ( IllegalArgumentException e )
+        {
+        }
+        try
+        {
+            lut.referralDeleted( ( String ) null );
+            fail( "can't get here" );
+        }
+        catch ( IllegalArgumentException e )
+        {
+        }
+        try
+        {
+            lut.referralChanged( ( Name ) null, ( Name ) null );
+            fail( "can't get here" );
+        }
+        catch ( IllegalArgumentException e )
+        {
+        }
+        try
+        {
+            lut.referralChanged( ( String ) null, ( String ) null );
+            fail( "can't get here" );
+        }
+        catch ( IllegalArgumentException e )
+        {
+        }
+        try
+        {
+            lut.referralChanged( ( Name ) null, ( String ) null );
+            fail( "can't get here" );
+        }
+        catch ( IllegalArgumentException e )
+        {
+        }
+        try
+        {
+            lut.referralChanged( ( String ) null, ( Name ) null );
+            fail( "can't get here" );
+        }
+        catch ( IllegalArgumentException e )
+        {
+        }
     }
-    
-    
+
+
     public void testUpdateOperations() throws NamingException
     {
         String dn = "ou=users,ou=system";
@@ -94,7 +178,7 @@
         assertTrue( lut.isReferral( dn ) );
         lut.referralDeleted( name );
         assertFalse( lut.isReferral( dn ) );
-        
+
         // change (rename and move) tests
         String newDn = "ou=people,ou=system";
         Name newName = new LdapName( newDn );
@@ -131,8 +215,8 @@
         assertTrue( lut.isReferral( newDn ) );
         lut.referralDeleted( dn );
     }
-    
-    
+
+
     public void testReferralAncestors() throws NamingException
     {
         Name ancestor = new LdapName( "ou=users,ou=system" );

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java Fri Feb 10 02:48:07 2006
@@ -52,7 +52,7 @@
     }
 
 
-    public SchemaCheckerTest( String name ) throws NamingException
+    public SchemaCheckerTest(String name) throws NamingException
     {
         super( name );
 
@@ -80,31 +80,30 @@
     }
 
 
-//    private GlobalRegistries getGlobalRegistries() throws NamingException
-//    {
-//        BootstrapRegistries bootstrapRegistries = new BootstrapRegistries();
-//
-//        BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-//        Set schemas = new HashSet();
-//        schemas.add( new SystemSchema() );
-//        schemas.add( new ApacheSchema() );
-//        schemas.add( new CoreSchema() );
-//        schemas.add( new CosineSchema() );
-//        schemas.add( new InetorgpersonSchema() );
-//        schemas.add( new JavaSchema() );
-//        loader.load( schemas, bootstrapRegistries );
-//
-//        java.util.List errors = bootstrapRegistries.checkRefInteg();
-//        if ( !errors.isEmpty() )
-//        {
-//            NamingException e = new NamingException();
-//            e.setRootCause( ( Throwable ) errors.get( 0 ) );
-//            throw e;
-//        }
-//
-//        return new GlobalRegistries( bootstrapRegistries );
-//    }
-
+    //    private GlobalRegistries getGlobalRegistries() throws NamingException
+    //    {
+    //        BootstrapRegistries bootstrapRegistries = new BootstrapRegistries();
+    //
+    //        BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
+    //        Set schemas = new HashSet();
+    //        schemas.add( new SystemSchema() );
+    //        schemas.add( new ApacheSchema() );
+    //        schemas.add( new CoreSchema() );
+    //        schemas.add( new CosineSchema() );
+    //        schemas.add( new InetorgpersonSchema() );
+    //        schemas.add( new JavaSchema() );
+    //        loader.load( schemas, bootstrapRegistries );
+    //
+    //        java.util.List errors = bootstrapRegistries.checkRefInteg();
+    //        if ( !errors.isEmpty() )
+    //        {
+    //            NamingException e = new NamingException();
+    //            e.setRootCause( ( Throwable ) errors.get( 0 ) );
+    //            throw e;
+    //        }
+    //
+    //        return new GlobalRegistries( bootstrapRegistries );
+    //    }
 
     /**
      * Test case to check the schema checker operates correctly when modify
@@ -180,7 +179,7 @@
 
         // this should pass
         SchemaChecker.preventStructuralClassRemovalOnModifyRemove( ocRegistry, name, mod, modifyAttributes,
-                entryObjectClasses );
+            entryObjectClasses );
 
         // this should succeed since person is left and is structural
         modifyAttributes.remove( "cn" );
@@ -188,7 +187,7 @@
         objectClassesRemoved.add( "person" );
         modifyAttributes.put( objectClassesRemoved );
         SchemaChecker.preventStructuralClassRemovalOnModifyRemove( ocRegistry, name, mod, modifyAttributes,
-                entryObjectClasses );
+            entryObjectClasses );
 
         // this should fail since only top is left
         modifyAttributes.remove( "cn" );
@@ -199,7 +198,7 @@
         try
         {
             SchemaChecker.preventStructuralClassRemovalOnModifyRemove( ocRegistry, name, mod, modifyAttributes,
-                    entryObjectClasses );
+                entryObjectClasses );
             fail( "should never get here due to an LdapSchemaViolationException" );
         }
         catch ( LdapSchemaViolationException e )
@@ -215,7 +214,7 @@
         try
         {
             SchemaChecker.preventStructuralClassRemovalOnModifyRemove( ocRegistry, name, mod, modifyAttributes,
-                    entryObjectClasses );
+                entryObjectClasses );
             fail( "should never get here due to an LdapSchemaViolationException" );
         }
         catch ( LdapSchemaViolationException e )
@@ -360,7 +359,6 @@
     // Single Attribute Test Cases
     // ------------------------------------------------------------------------
 
-
     /**
      * Test case to check the schema checker operates correctly when modify
      * operations replace objectClasses.
@@ -425,13 +423,13 @@
 
         // this should pass
         SchemaChecker.preventStructuralClassRemovalOnModifyRemove( ocRegistry, name, mod, new BasicAttribute( "cn" ),
-                entryObjectClasses );
+            entryObjectClasses );
 
         // this should succeed since person is left and is structural
         BasicAttribute objectClassesRemoved = new BasicAttribute( "objectClass" );
         objectClassesRemoved.add( "person" );
         SchemaChecker.preventStructuralClassRemovalOnModifyRemove( ocRegistry, name, mod, objectClassesRemoved,
-                entryObjectClasses );
+            entryObjectClasses );
 
         // this should fail since only top is left
         objectClassesRemoved = new BasicAttribute( "objectClass" );
@@ -440,7 +438,7 @@
         try
         {
             SchemaChecker.preventStructuralClassRemovalOnModifyRemove( ocRegistry, name, mod, objectClassesRemoved,
-                    entryObjectClasses );
+                entryObjectClasses );
             fail( "should never get here due to an LdapSchemaViolationException" );
         }
         catch ( LdapSchemaViolationException e )
@@ -454,7 +452,7 @@
         try
         {
             SchemaChecker.preventStructuralClassRemovalOnModifyRemove( ocRegistry, name, mod, objectClassesRemoved,
-                    entryObjectClasses );
+                entryObjectClasses );
             fail( "should never get here due to an LdapSchemaViolationException" );
         }
         catch ( LdapSchemaViolationException e )

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.directory.server.core.schema;
 
+
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.BasicAttribute;
@@ -42,15 +43,15 @@
 public class SchemaServiceTest extends TestCase
 {
     ObjectClassRegistry registry = null;
-    
-    
+
+
     public void setUp() throws Exception
     {
         if ( registry != null )
         {
             return;
         }
-        
+
         BootstrapRegistries registries = new BootstrapRegistries();
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
         loader.load( new ApacheSchema(), registries );
@@ -60,12 +61,12 @@
         loader.load( new SystemSchema(), registries );
         registry = registries.getObjectClassRegistry();
     }
-    
-    
-    public void testAlterObjectClassesBogusAttr() throws NamingException 
+
+
+    public void testAlterObjectClassesBogusAttr() throws NamingException
     {
         Attribute attr = new BasicAttribute( "blah", "blah" );
-        
+
         try
         {
             SchemaService.alterObjectClasses( attr, registry );
@@ -80,25 +81,25 @@
         SchemaService.alterObjectClasses( attr, registry );
         assertEquals( 0, attr.size() );
     }
-    
-    
-    public void testAlterObjectClassesNoAttrValue() throws NamingException 
+
+
+    public void testAlterObjectClassesNoAttrValue() throws NamingException
     {
         Attribute attr = new BasicAttribute( "objectClass" );
         SchemaService.alterObjectClasses( attr, registry );
         assertEquals( 0, attr.size() );
     }
-    
-    
-    public void testAlterObjectClassesTopAttrValue() throws NamingException 
+
+
+    public void testAlterObjectClassesTopAttrValue() throws NamingException
     {
         Attribute attr = new BasicAttribute( "objectClass", "top" );
         SchemaService.alterObjectClasses( attr, registry );
         assertEquals( 0, attr.size() );
     }
-    
-    
-    public void testAlterObjectClassesInetOrgPersonAttrValue() throws NamingException 
+
+
+    public void testAlterObjectClassesInetOrgPersonAttrValue() throws NamingException
     {
         Attribute attr = new BasicAttribute( "objectClass", "inetOrgPerson" );
         SchemaService.alterObjectClasses( attr, registry );
@@ -109,7 +110,7 @@
     }
 
 
-    public void testAlterObjectClassesOverlapping() throws NamingException 
+    public void testAlterObjectClassesOverlapping() throws NamingException
     {
         Attribute attr = new BasicAttribute( "objectClass", "inetOrgPerson" );
         attr.add( "residentialPerson" );
@@ -122,7 +123,7 @@
     }
 
 
-    public void testAlterObjectClassesOverlappingAndDsa() throws NamingException 
+    public void testAlterObjectClassesOverlappingAndDsa() throws NamingException
     {
         Attribute attr = new BasicAttribute( "objectClass", "inetOrgPerson" );
         attr.add( "residentialPerson" );

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSchemaLoaderTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSchemaLoaderTest.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSchemaLoaderTest.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSchemaLoaderTest.java Fri Feb 10 02:48:07 2006
@@ -169,11 +169,11 @@
     public void testEveDepsSchemaLoad() throws NamingException
     {
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-        
+
         Set schemas = new HashSet();
         schemas.add( new ApacheSchema() );
         schemas.add( new SystemSchema() );
-        
+
         loader.load( schemas, registries );
         AttributeType type;
         type = registries.getAttributeTypeRegistry().lookup( "apacheNdn" );
@@ -214,7 +214,7 @@
         Set schemas = new HashSet();
         schemas.add( new CoreSchema() );
         schemas.add( new SystemSchema() );
-        
+
         loader.load( schemas, registries );
         AttributeType type;
         type = registries.getAttributeTypeRegistry().lookup( "knowledgeInformation" );
@@ -256,7 +256,7 @@
         schemas.add( new CoreSchema() );
         schemas.add( new JavaSchema() );
         schemas.add( new SystemSchema() );
-        
+
         loader.load( schemas, registries );
         AttributeType type;
         type = registries.getAttributeTypeRegistry().lookup( "javaFactory" );
@@ -313,10 +313,9 @@
 
         StringBuffer buf = new StringBuffer();
 
-        if ( ! errors.isEmpty() )
+        if ( !errors.isEmpty() )
         {
-            buf.append( "expected empty erorrs but got " )
-                    .append( errors.size() ).append( " errors:\n" );
+            buf.append( "expected empty erorrs but got " ).append( errors.size() ).append( " errors:\n" );
             for ( int ii = 0; ii < errors.size(); ii++ )
             {
                 buf.append( '\t' ).append( errors.get( ii ).toString() ).append( '\n' );
@@ -331,4 +330,3 @@
         assertTrue( buf.toString(), errors.isEmpty() );
     }
 }
-                                   
\ No newline at end of file

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java Fri Feb 10 02:48:07 2006
@@ -121,8 +121,7 @@
 
         try
         {
-            assertFalse( evaluator.evaluate( new SimpleNode( "", "", LeafNode.EQUALITY ),
-                    new BasicAttribute( "blah") ) );
+            assertFalse( evaluator.evaluate( new SimpleNode( "", "", LeafNode.EQUALITY ), new BasicAttribute( "blah" ) ) );
             fail( "should never get here due to an IAE" );
         }
         catch ( IllegalArgumentException iae )
@@ -137,23 +136,19 @@
 
         // positive test
         objectClasses = new BasicAttribute( "objectClass", "person" );
-        assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "person", LeafNode.EQUALITY ),
-                objectClasses ) );
+        assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "person", LeafNode.EQUALITY ), objectClasses ) );
 
         objectClasses = new BasicAttribute( "objectClass" );
         objectClasses.add( "person" );
         objectClasses.add( "blah" );
-        assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "person", LeafNode.EQUALITY ),
-                objectClasses ) );
+        assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "person", LeafNode.EQUALITY ), objectClasses ) );
 
         // negative tests
         objectClasses = new BasicAttribute( "objectClass", "person" );
-        assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "blah", LeafNode.EQUALITY ),
-                objectClasses ) );
+        assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "blah", LeafNode.EQUALITY ), objectClasses ) );
 
         objectClasses = new BasicAttribute( "objectClass", "blah" );
-        assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "person", LeafNode.EQUALITY ),
-                objectClasses ) );
+        assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "person", LeafNode.EQUALITY ), objectClasses ) );
     }
 
 
@@ -163,23 +158,19 @@
 
         // positive test
         objectClasses = new BasicAttribute( "objectClass", "person" );
-        assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.6", LeafNode.EQUALITY ),
-                objectClasses ) );
+        assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.6", LeafNode.EQUALITY ), objectClasses ) );
 
         objectClasses = new BasicAttribute( "objectClass" );
         objectClasses.add( "person" );
         objectClasses.add( "blah" );
-        assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.6", LeafNode.EQUALITY ),
-                objectClasses ) );
+        assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.6", LeafNode.EQUALITY ), objectClasses ) );
 
         // negative tests
         objectClasses = new BasicAttribute( "objectClass", "person" );
-        assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.5", LeafNode.EQUALITY ),
-                objectClasses ) );
+        assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.5", LeafNode.EQUALITY ), objectClasses ) );
 
         objectClasses = new BasicAttribute( "objectClass", "blah" );
-        assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.5", LeafNode.EQUALITY ),
-                objectClasses ) );
+        assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.5", LeafNode.EQUALITY ), objectClasses ) );
     }
 
 
@@ -234,8 +225,7 @@
 
         try
         {
-            assertFalse( evaluator.evaluate( new BranchNode( 1000 ),
-                    new BasicAttribute( "objectClass" ) ) );
+            assertFalse( evaluator.evaluate( new BranchNode( 1000 ), new BasicAttribute( "objectClass" ) ) );
             fail( "should never get here due to an IAE" );
         }
         catch ( IllegalArgumentException iae )
@@ -244,8 +234,7 @@
 
         try
         {
-            assertFalse( evaluator.evaluate( new BranchNode( BranchNode.NOT ),
-                    new BasicAttribute( "objectClass" ) ) );
+            assertFalse( evaluator.evaluate( new BranchNode( BranchNode.NOT ), new BasicAttribute( "objectClass" ) ) );
             fail( "should never get here due to an IAE" );
         }
         catch ( IllegalArgumentException iae )

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java Fri Feb 10 02:48:07 2006
@@ -151,23 +151,19 @@
 
         // positive test
         objectClasses = new BasicAttribute( "objectClass", "person" );
-        assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "person", LeafNode.EQUALITY ),
-                objectClasses ) );
+        assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "person", LeafNode.EQUALITY ), objectClasses ) );
 
         objectClasses = new BasicAttribute( "objectClass" );
         objectClasses.add( "person" );
         objectClasses.add( "blah" );
-        assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "person", LeafNode.EQUALITY ),
-                objectClasses ) );
+        assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "person", LeafNode.EQUALITY ), objectClasses ) );
 
         // negative tests
         objectClasses = new BasicAttribute( "objectClass", "person" );
-        assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "blah", LeafNode.EQUALITY ),
-                objectClasses ) );
+        assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "blah", LeafNode.EQUALITY ), objectClasses ) );
 
         objectClasses = new BasicAttribute( "objectClass", "blah" );
-        assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "person", LeafNode.EQUALITY ),
-                objectClasses ) );
+        assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "person", LeafNode.EQUALITY ), objectClasses ) );
     }
 
 
@@ -177,22 +173,18 @@
 
         // positive test
         objectClasses = new BasicAttribute( "objectClass", "person" );
-        assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.6", LeafNode.EQUALITY ),
-                objectClasses ) );
+        assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.6", LeafNode.EQUALITY ), objectClasses ) );
 
         objectClasses = new BasicAttribute( "objectClass" );
         objectClasses.add( "person" );
         objectClasses.add( "blah" );
-        assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.6", LeafNode.EQUALITY ),
-                objectClasses ) );
+        assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.6", LeafNode.EQUALITY ), objectClasses ) );
 
         // negative tests
         objectClasses = new BasicAttribute( "objectClass", "person" );
-        assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.5", LeafNode.EQUALITY ),
-                objectClasses ) );
+        assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.5", LeafNode.EQUALITY ), objectClasses ) );
 
         objectClasses = new BasicAttribute( "objectClass", "blah" );
-        assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.5", LeafNode.EQUALITY ),
-                objectClasses ) );
+        assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.5", LeafNode.EQUALITY ), objectClasses ) );
     }
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/ChecksumEngine.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/ChecksumEngine.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/ChecksumEngine.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/ChecksumEngine.java Fri Feb 10 02:48:07 2006
@@ -16,28 +16,47 @@
  */
 package org.apache.kerberos.crypto.checksum;
 
+
 import org.apache.kerberos.crypto.encryption.CipherType;
 import org.bouncycastle.crypto.Digest;
 
+
 public abstract class ChecksumEngine
 {
     public abstract Digest getDigest();
+
+
     public abstract ChecksumType checksumType();
+
+
     public abstract CipherType keyType();
+
+
     public abstract int checksumSize();
+
+
     public abstract int keySize();
+
+
     public abstract int confounderSize();
+
+
     public abstract boolean isSafe();
+
+
     public abstract byte[] calculateKeyedChecksum( byte[] data, byte[] key );
+
+
     public abstract boolean verifyKeyedChecksum( byte[] data, byte[] key, byte[] checksum );
 
+
     public byte[] calculateChecksum( byte[] data )
     {
         Digest digester = getDigest();
 
         digester.reset();
         digester.update( data, 0, data.length );
-        byte[] returnValue = new byte[ digester.getDigestSize() ];
+        byte[] returnValue = new byte[digester.getDigestSize()];
         digester.doFinal( returnValue, 0 );
         return returnValue;
     }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/ChecksumType.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/ChecksumType.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/ChecksumType.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/ChecksumType.java Fri Feb 10 02:48:07 2006
@@ -16,77 +16,84 @@
  */
 package org.apache.kerberos.crypto.checksum;
 
+
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
+
 public final class ChecksumType implements Comparable
 {
-	/**
-	 * Enumeration elements are constructed once upon class loading.
-	 * Order of appearance here determines the order of compareTo.
-	 */
-    public static final ChecksumType UNKNOWN        = new ChecksumType(-1, "UNKNOWN");
-    public static final ChecksumType NULL           = new ChecksumType(0, "NULL");
-    public static final ChecksumType CRC32          = new ChecksumType(1, "CRC32");
-    public static final ChecksumType RSA_MD4        = new ChecksumType(2, "rsa-md4");
-    public static final ChecksumType RSA_MD4_DES    = new ChecksumType(3, "rsa-md4-des");
-    public static final ChecksumType DES_MAC        = new ChecksumType(4, "des-mac");
-    public static final ChecksumType DES_MAC_K      = new ChecksumType(5, "des-mac-k");
-    public static final ChecksumType RSA_MD4_DES_K  = new ChecksumType(6, "rsa-md4-des-k");
-    public static final ChecksumType RSA_MD5        = new ChecksumType(7, "rsa-md5");
-    public static final ChecksumType RSA_MD5_DES    = new ChecksumType(8, "rsa-md5-des");
-    public static final ChecksumType RSA_MD5_DES3   = new ChecksumType(9, "rsa-md5-des3");
-    public static final ChecksumType SHA1           = new ChecksumType(10, "sha1 (unkeyed)");
-    public static final ChecksumType HMAC_SHA1_DES3_KD   = new ChecksumType(12, "hmac-sha1-des3-kd");
-    public static final ChecksumType HMAC_SHA1_DES3      = new ChecksumType(13, "hmac-sha1-des3");
-    public static final ChecksumType SHA1_2              = new ChecksumType(14, "sha1 (unkeyed)");
-    public static final ChecksumType HMAC_SHA1_96_AES128 = new ChecksumType(15, "hmac-sha1-96-aes128");
-    public static final ChecksumType HMAC_SHA1_96_AES256 = new ChecksumType(16, "hmac-sha1-96-aes256");
+    /**
+     * Enumeration elements are constructed once upon class loading.
+     * Order of appearance here determines the order of compareTo.
+     */
+    public static final ChecksumType UNKNOWN = new ChecksumType( -1, "UNKNOWN" );
+    public static final ChecksumType NULL = new ChecksumType( 0, "NULL" );
+    public static final ChecksumType CRC32 = new ChecksumType( 1, "CRC32" );
+    public static final ChecksumType RSA_MD4 = new ChecksumType( 2, "rsa-md4" );
+    public static final ChecksumType RSA_MD4_DES = new ChecksumType( 3, "rsa-md4-des" );
+    public static final ChecksumType DES_MAC = new ChecksumType( 4, "des-mac" );
+    public static final ChecksumType DES_MAC_K = new ChecksumType( 5, "des-mac-k" );
+    public static final ChecksumType RSA_MD4_DES_K = new ChecksumType( 6, "rsa-md4-des-k" );
+    public static final ChecksumType RSA_MD5 = new ChecksumType( 7, "rsa-md5" );
+    public static final ChecksumType RSA_MD5_DES = new ChecksumType( 8, "rsa-md5-des" );
+    public static final ChecksumType RSA_MD5_DES3 = new ChecksumType( 9, "rsa-md5-des3" );
+    public static final ChecksumType SHA1 = new ChecksumType( 10, "sha1 (unkeyed)" );
+    public static final ChecksumType HMAC_SHA1_DES3_KD = new ChecksumType( 12, "hmac-sha1-des3-kd" );
+    public static final ChecksumType HMAC_SHA1_DES3 = new ChecksumType( 13, "hmac-sha1-des3" );
+    public static final ChecksumType SHA1_2 = new ChecksumType( 14, "sha1 (unkeyed)" );
+    public static final ChecksumType HMAC_SHA1_96_AES128 = new ChecksumType( 15, "hmac-sha1-96-aes128" );
+    public static final ChecksumType HMAC_SHA1_96_AES256 = new ChecksumType( 16, "hmac-sha1-96-aes256" );
 
     /**
      * These two lines are all that's necessary to export a List of VALUES.
      */
-    private static final ChecksumType[] values = { UNKNOWN, NULL, CRC32, RSA_MD4, RSA_MD4_DES, DES_MAC, DES_MAC_K,
-            RSA_MD4_DES_K, RSA_MD5, RSA_MD5_DES, RSA_MD5_DES3, SHA1, HMAC_SHA1_DES3_KD, HMAC_SHA1_DES3, SHA1_2,
-            HMAC_SHA1_96_AES128, HMAC_SHA1_96_AES256 };
+    private static final ChecksumType[] values =
+        { UNKNOWN, NULL, CRC32, RSA_MD4, RSA_MD4_DES, DES_MAC, DES_MAC_K, RSA_MD4_DES_K, RSA_MD5, RSA_MD5_DES,
+            RSA_MD5_DES3, SHA1, HMAC_SHA1_DES3_KD, HMAC_SHA1_DES3, SHA1_2, HMAC_SHA1_96_AES128, HMAC_SHA1_96_AES256 };
     // VALUES needs to be located here, otherwise illegal forward reference
     public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
 
     private final String name;
     private final int ordinal;
 
+
     /**
      * Private constructor prevents construction outside of this class.
      */
-    private ChecksumType( int ordinal, String name )
+    private ChecksumType(int ordinal, String name)
     {
         this.ordinal = ordinal;
         this.name = name;
     }
 
+
     public static ChecksumType getTypeByOrdinal( int type )
     {
         for ( int ii = 0; ii < values.length; ii++ )
         {
-            if ( values[ ii ].ordinal == type )
+            if ( values[ii].ordinal == type )
             {
-                return values[ ii ];
+                return values[ii];
             }
         }
 
         return UNKNOWN;
     }
 
+
     public int getOrdinal()
     {
         return ordinal;
     }
 
+
     public int compareTo( Object that )
     {
-        return ordinal - ( (ChecksumType) that ).ordinal;
+        return ordinal - ( ( ChecksumType ) that ).ordinal;
     }
+
 
     public String toString()
     {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/Crc32Checksum.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/Crc32Checksum.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/Crc32Checksum.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/Crc32Checksum.java Fri Feb 10 02:48:07 2006
@@ -16,11 +16,13 @@
  */
 package org.apache.kerberos.crypto.checksum;
 
+
 import java.util.zip.CRC32;
 
 import org.apache.kerberos.crypto.encryption.CipherType;
 import org.bouncycastle.crypto.Digest;
 
+
 public class Crc32Checksum extends ChecksumEngine
 {
     public Digest getDigest()
@@ -28,41 +30,49 @@
         return new CRC32Digest();
     }
 
+
     public ChecksumType checksumType()
     {
         return ChecksumType.CRC32;
     }
 
+
     public CipherType keyType()
     {
         return CipherType.NULL;
     }
 
+
     public int checksumSize()
     {
         return 4;
     }
 
+
     public int keySize()
     {
         return 0;
     }
 
+
     public int confounderSize()
     {
         return 0;
     }
 
+
     public boolean isSafe()
     {
         return false;
     }
 
+
     public byte[] calculateKeyedChecksum( byte[] data, byte[] key )
     {
         return null;
     }
 
+
     public boolean verifyKeyedChecksum( byte[] data, byte[] key, byte[] checksum )
     {
         return false;
@@ -72,46 +82,53 @@
     {
         private CRC32 crc32 = new CRC32();
 
+
         public String getAlgorithmName()
         {
             return "CRC-32";
         }
 
+
         public int getDigestSize()
         {
             return 4;
         }
 
+
         public void reset()
         {
             crc32.reset();
         }
 
+
         public void update( byte in )
         {
             crc32.update( in );
         }
 
+
         public void update( byte[] in, int inOff, int len )
         {
             crc32.update( in, inOff, len );
         }
 
+
         public int doFinal( byte[] out, int outOff )
         {
-            out = int2octet( (int) crc32.getValue() );
+            out = int2octet( ( int ) crc32.getValue() );
 
             return 0;
         }
 
+
         private byte[] int2octet( int value )
         {
-            byte[] bytes = new byte[ 4 ];
+            byte[] bytes = new byte[4];
             int i, shift;
 
             for ( i = 0, shift = 24; i < 4; i++, shift -= 8 )
             {
-                bytes[ i ] = (byte) ( 0xFF & ( value >> shift ) );
+                bytes[i] = ( byte ) ( 0xFF & ( value >> shift ) );
             }
 
             return bytes;

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/RsaMd4Checksum.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/RsaMd4Checksum.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/RsaMd4Checksum.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/RsaMd4Checksum.java Fri Feb 10 02:48:07 2006
@@ -16,10 +16,12 @@
  */
 package org.apache.kerberos.crypto.checksum;
 
+
 import org.apache.kerberos.crypto.encryption.CipherType;
 import org.bouncycastle.crypto.Digest;
 import org.bouncycastle.crypto.digests.MD4Digest;
 
+
 public class RsaMd4Checksum extends ChecksumEngine
 {
     public Digest getDigest()
@@ -27,40 +29,48 @@
         return new MD4Digest();
     }
 
+
     public ChecksumType checksumType()
     {
         return ChecksumType.RSA_MD4;
     }
 
+
     public CipherType keyType()
     {
         return CipherType.NULL;
     }
 
+
     public int checksumSize()
     {
         return 16;
     }
 
+
     public int keySize()
     {
         return 0;
     }
 
+
     public int confounderSize()
     {
         return 0;
     }
 
+
     public boolean isSafe()
     {
         return false;
     }
 
+
     public byte[] calculateKeyedChecksum( byte[] data, byte[] key )
     {
         return null;
     }
+
 
     public boolean verifyKeyedChecksum( byte[] data, byte[] key, byte[] checksum )
     {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/RsaMd5Checksum.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/RsaMd5Checksum.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/RsaMd5Checksum.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/RsaMd5Checksum.java Fri Feb 10 02:48:07 2006
@@ -16,10 +16,12 @@
  */
 package org.apache.kerberos.crypto.checksum;
 
+
 import org.apache.kerberos.crypto.encryption.CipherType;
 import org.bouncycastle.crypto.Digest;
 import org.bouncycastle.crypto.digests.MD5Digest;
 
+
 public class RsaMd5Checksum extends ChecksumEngine
 {
     public Digest getDigest()
@@ -27,40 +29,48 @@
         return new MD5Digest();
     }
 
+
     public ChecksumType checksumType()
     {
         return ChecksumType.RSA_MD5;
     }
 
+
     public CipherType keyType()
     {
         return CipherType.NULL;
     }
 
+
     public int checksumSize()
     {
         return 16;
     }
 
+
     public int keySize()
     {
         return 0;
     }
 
+
     public int confounderSize()
     {
         return 0;
     }
 
+
     public boolean isSafe()
     {
         return false;
     }
 
+
     public byte[] calculateKeyedChecksum( byte[] data, byte[] key )
     {
         return null;
     }
+
 
     public boolean verifyKeyedChecksum( byte[] data, byte[] key, byte[] checksum )
     {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/Sha1Checksum.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/Sha1Checksum.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/Sha1Checksum.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/checksum/Sha1Checksum.java Fri Feb 10 02:48:07 2006
@@ -16,10 +16,12 @@
  */
 package org.apache.kerberos.crypto.checksum;
 
+
 import org.apache.kerberos.crypto.encryption.CipherType;
 import org.bouncycastle.crypto.Digest;
 import org.bouncycastle.crypto.digests.SHA1Digest;
 
+
 public class Sha1Checksum extends ChecksumEngine
 {
     public Digest getDigest()
@@ -27,40 +29,48 @@
         return new SHA1Digest();
     }
 
+
     public ChecksumType checksumType()
     {
         return ChecksumType.SHA1;
     }
 
+
     public CipherType keyType()
     {
         return CipherType.NULL;
     }
 
+
     public int checksumSize()
     {
         return 20;
     }
 
+
     public int keySize()
     {
         return 0;
     }
 
+
     public int confounderSize()
     {
         return 0;
     }
 
+
     public boolean isSafe()
     {
         return false;
     }
 
+
     public byte[] calculateKeyedChecksum( byte[] data, byte[] key )
     {
         return null;
     }
+
 
     public boolean verifyKeyedChecksum( byte[] data, byte[] key, byte[] checksum )
     {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/CipherType.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/CipherType.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/CipherType.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/CipherType.java Fri Feb 10 02:48:07 2006
@@ -16,25 +16,28 @@
  */
 package org.apache.kerberos.crypto.encryption;
 
+
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
+
 public final class CipherType implements Comparable
 {
     /**
      * Enumeration elements are constructed once upon class loading.
      * Order of appearance here determines the order of compareTo.
      */
-    public static final CipherType NULL   = new CipherType( "NULL" );
-    public static final CipherType DES    = new CipherType( "DES" );
-    public static final CipherType DES3   = new CipherType( "DES3" );
+    public static final CipherType NULL = new CipherType( "NULL" );
+    public static final CipherType DES = new CipherType( "DES" );
+    public static final CipherType DES3 = new CipherType( "DES3" );
     public static final CipherType AES128 = new CipherType( "AES128" );
 
     /**
      * These two lines are all that's necessary to export a List of VALUES.
      */
-    private static final CipherType[] values = { NULL, DES, DES3, AES128 };
+    private static final CipherType[] values =
+        { NULL, DES, DES3, AES128 };
     // VALUES needs to be located here, otherwise illegal forward reference
     public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
 
@@ -42,31 +45,35 @@
     private static int nextOrdinal = 0;
     private final int ordinal = nextOrdinal++;
 
+
     /**
      * Private constructor prevents construction outside of this class.
      */
-    private CipherType( String name )
+    private CipherType(String name)
     {
         this.name = name;
     }
 
+
     public CipherType getTypeByOrdinal( int type )
     {
         for ( int ii = 0; ii < values.length; ii++ )
         {
-            if ( values[ ii ].ordinal == type )
+            if ( values[ii].ordinal == type )
             {
-                return values[ ii ];
+                return values[ii];
             }
         }
 
         return NULL;
     }
 
+
     public int compareTo( Object that )
     {
-        return ordinal - ( (CipherType) that ).ordinal;
+        return ordinal - ( ( CipherType ) that ).ordinal;
     }
+
 
     public String toString()
     {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/Des3CbcEncryption.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/Des3CbcEncryption.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/Des3CbcEncryption.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/Des3CbcEncryption.java Fri Feb 10 02:48:07 2006
@@ -16,9 +16,11 @@
  */
 package org.apache.kerberos.crypto.encryption;
 
+
 import org.bouncycastle.crypto.BlockCipher;
 import org.bouncycastle.crypto.engines.DESedeEngine;
 
+
 public abstract class Des3CbcEncryption extends EncryptionEngine
 {
     public BlockCipher getBlockCipher()
@@ -26,15 +28,18 @@
         return new DESedeEngine();
     }
 
+
     public CipherType keyType()
     {
         return CipherType.DES3;
     }
 
+
     public int blockSize()
     {
         return 8;
     }
+
 
     public int keySize()
     {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/Des3CbcMd5Encryption.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/Des3CbcMd5Encryption.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/Des3CbcMd5Encryption.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/Des3CbcMd5Encryption.java Fri Feb 10 02:48:07 2006
@@ -16,10 +16,12 @@
  */
 package org.apache.kerberos.crypto.encryption;
 
+
 import org.apache.kerberos.crypto.checksum.ChecksumEngine;
 import org.apache.kerberos.crypto.checksum.ChecksumType;
 import org.apache.kerberos.crypto.checksum.RsaMd5Checksum;
 
+
 public class Des3CbcMd5Encryption extends Des3CbcEncryption
 {
     public ChecksumEngine getChecksumEngine()
@@ -27,25 +29,30 @@
         return new RsaMd5Checksum();
     }
 
+
     public EncryptionType encryptionType()
     {
         return EncryptionType.DES3_CBC_MD5;
     }
 
+
     public ChecksumType checksumType()
     {
         return ChecksumType.RSA_MD5;
     }
 
+
     public int confounderSize()
     {
         return 8;
     }
 
+
     public int checksumSize()
     {
         return 16;
     }
+
 
     public int minimumPadSize()
     {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/Des3CbcSha1Encryption.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/Des3CbcSha1Encryption.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/Des3CbcSha1Encryption.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/Des3CbcSha1Encryption.java Fri Feb 10 02:48:07 2006
@@ -16,10 +16,12 @@
  */
 package org.apache.kerberos.crypto.encryption;
 
+
 import org.apache.kerberos.crypto.checksum.ChecksumEngine;
 import org.apache.kerberos.crypto.checksum.ChecksumType;
 import org.apache.kerberos.crypto.checksum.Sha1Checksum;
 
+
 public class Des3CbcSha1Encryption extends Des3CbcEncryption
 {
     public ChecksumEngine getChecksumEngine()
@@ -27,25 +29,30 @@
         return new Sha1Checksum();
     }
 
+
     public EncryptionType encryptionType()
     {
         return EncryptionType.DES3_CBC_SHA1;
     }
 
+
     public ChecksumType checksumType()
     {
         return ChecksumType.SHA1;
     }
 
+
     public int confounderSize()
     {
         return 8;
     }
 
+
     public int checksumSize()
     {
         return 20;
     }
+
 
     public int minimumPadSize()
     {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/DesCbcCrcEncryption.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/DesCbcCrcEncryption.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/DesCbcCrcEncryption.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/DesCbcCrcEncryption.java Fri Feb 10 02:48:07 2006
@@ -16,10 +16,12 @@
  */
 package org.apache.kerberos.crypto.encryption;
 
+
 import org.apache.kerberos.crypto.checksum.ChecksumEngine;
 import org.apache.kerberos.crypto.checksum.ChecksumType;
 import org.apache.kerberos.crypto.checksum.Crc32Checksum;
 
+
 public class DesCbcCrcEncryption extends DesCbcEncryption
 {
     public ChecksumEngine getChecksumEngine()
@@ -27,30 +29,36 @@
         return new Crc32Checksum();
     }
 
+
     public EncryptionType encryptionType()
     {
         return EncryptionType.DES_CBC_CRC;
     }
 
+
     public ChecksumType checksumType()
     {
         return ChecksumType.CRC32;
     }
 
+
     public CipherType cipherType()
     {
         return CipherType.DES;
     }
 
+
     public int confounderSize()
     {
         return 8;
     }
 
+
     public int checksumSize()
     {
         return 4;
     }
+
 
     public int minimumPadSize()
     {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/DesCbcEncryption.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/DesCbcEncryption.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/DesCbcEncryption.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/DesCbcEncryption.java Fri Feb 10 02:48:07 2006
@@ -16,9 +16,11 @@
  */
 package org.apache.kerberos.crypto.encryption;
 
+
 import org.bouncycastle.crypto.BlockCipher;
 import org.bouncycastle.crypto.engines.DESEngine;
 
+
 public abstract class DesCbcEncryption extends EncryptionEngine
 {
     public BlockCipher getBlockCipher()
@@ -26,15 +28,18 @@
         return new DESEngine();
     }
 
+
     public CipherType keyType()
     {
         return CipherType.DES;
     }
 
+
     public int blockSize()
     {
         return 8;
     }
+
 
     public int keySize()
     {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/DesCbcMd4Encryption.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/DesCbcMd4Encryption.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/DesCbcMd4Encryption.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/DesCbcMd4Encryption.java Fri Feb 10 02:48:07 2006
@@ -16,10 +16,12 @@
  */
 package org.apache.kerberos.crypto.encryption;
 
+
 import org.apache.kerberos.crypto.checksum.ChecksumEngine;
 import org.apache.kerberos.crypto.checksum.ChecksumType;
 import org.apache.kerberos.crypto.checksum.RsaMd4Checksum;
 
+
 public class DesCbcMd4Encryption extends DesCbcEncryption
 {
     public ChecksumEngine getChecksumEngine()
@@ -27,25 +29,30 @@
         return new RsaMd4Checksum();
     }
 
+
     public EncryptionType encryptionType()
     {
         return EncryptionType.DES_CBC_MD4;
     }
 
+
     public ChecksumType checksumType()
     {
         return ChecksumType.RSA_MD4;
     }
 
+
     public int confounderSize()
     {
         return 8;
     }
 
+
     public int checksumSize()
     {
         return 16;
     }
+
 
     public int minimumPadSize()
     {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/DesCbcMd5Encryption.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/DesCbcMd5Encryption.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/DesCbcMd5Encryption.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/DesCbcMd5Encryption.java Fri Feb 10 02:48:07 2006
@@ -16,10 +16,12 @@
  */
 package org.apache.kerberos.crypto.encryption;
 
+
 import org.apache.kerberos.crypto.checksum.ChecksumEngine;
 import org.apache.kerberos.crypto.checksum.ChecksumType;
 import org.apache.kerberos.crypto.checksum.RsaMd5Checksum;
 
+
 public class DesCbcMd5Encryption extends DesCbcEncryption
 {
     public ChecksumEngine getChecksumEngine()
@@ -27,25 +29,30 @@
         return new RsaMd5Checksum();
     }
 
+
     public EncryptionType encryptionType()
     {
         return EncryptionType.DES_CBC_MD5;
     }
 
+
     public ChecksumType checksumType()
     {
         return ChecksumType.RSA_MD5;
     }
 
+
     public int confounderSize()
     {
         return 8;
     }
 
+
     public int checksumSize()
     {
         return 16;
     }
+
 
     public int minimumPadSize()
     {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/EncryptionEngine.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/EncryptionEngine.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/EncryptionEngine.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/EncryptionEngine.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.crypto.encryption;
 
+
 import java.security.SecureRandom;
 
 import org.apache.kerberos.crypto.checksum.ChecksumEngine;
@@ -27,20 +28,42 @@
 import org.bouncycastle.crypto.params.KeyParameter;
 import org.bouncycastle.crypto.params.ParametersWithIV;
 
+
 public abstract class EncryptionEngine
 {
     private static final SecureRandom random = new SecureRandom();
+
+
     public abstract ChecksumEngine getChecksumEngine();
+
+
     public abstract BlockCipher getBlockCipher();
+
+
     public abstract EncryptionType encryptionType();
+
+
     public abstract ChecksumType checksumType();
+
+
     public abstract CipherType keyType();
+
+
     public abstract int confounderSize();
+
+
     public abstract int checksumSize();
+
+
     public abstract int blockSize();
+
+
     public abstract int minimumPadSize();
+
+
     public abstract int keySize();
 
+
     public byte[] getDecryptedData( EncryptionKey key, EncryptedData data )
     {
         byte[] decryptedData = decrypt( data.getCipherText(), key.getKeyValue() );
@@ -48,20 +71,20 @@
         return removeBytes( decryptedData, confounderSize(), checksumSize() );
     }
 
+
     public EncryptedData getEncryptedData( EncryptionKey key, byte[] plainText )
     {
         byte[] conFounder = getRandomBytes( confounderSize() );
-        byte[] zeroedChecksum = new byte[ checksumSize() ];
+        byte[] zeroedChecksum = new byte[checksumSize()];
         byte[] paddedPlainText = padString( plainText );
-        byte[] dataBytes = concatenateBytes( conFounder, concatenateBytes( zeroedChecksum,
-                paddedPlainText ) );
+        byte[] dataBytes = concatenateBytes( conFounder, concatenateBytes( zeroedChecksum, paddedPlainText ) );
         byte[] checksumBytes = calculateChecksum( dataBytes );
         byte[] paddedDataBytes = padString( dataBytes );
 
         // lay the checksum into the ciphertext
         for ( int i = confounderSize(); i < confounderSize() + checksumSize(); i++ )
         {
-            paddedDataBytes[ i ] = checksumBytes[ i - confounderSize() ];
+            paddedDataBytes[i] = checksumBytes[i - confounderSize()];
         }
 
         byte[] encryptedData = encrypt( paddedDataBytes, key.getKeyValue() );
@@ -69,19 +92,22 @@
         return new EncryptedData( encryptionType(), key.getKeyVersion(), encryptedData );
     }
 
+
     private byte[] encrypt( byte[] data, byte[] key )
     {
         return processBlockCipher( true, data, key, null );
     }
 
+
     private byte[] decrypt( byte[] data, byte[] key )
     {
         return processBlockCipher( false, data, key, null );
     }
 
+
     private byte[] getRandomBytes( int size )
     {
-        byte[] bytes = new byte[ size ];
+        byte[] bytes = new byte[size];
 
         // SecureRandom.nextBytes is already synchronized
         random.nextBytes( bytes );
@@ -89,6 +115,7 @@
         return bytes;
     }
 
+
     private byte[] padString( byte encodedString[] )
     {
         int x;
@@ -106,11 +133,11 @@
             return encodedString;
         }
 
-        byte paddedByteArray[] = new byte[ ( 8 - x ) + encodedString.length ];
-        
+        byte paddedByteArray[] = new byte[( 8 - x ) + encodedString.length];
+
         for ( int y = paddedByteArray.length - 1; y > encodedString.length - 1; y-- )
         {
-            paddedByteArray[ y ] = 0;
+            paddedByteArray[y] = 0;
         }
 
         System.arraycopy( encodedString, 0, paddedByteArray, 0, encodedString.length );
@@ -118,23 +145,25 @@
         return paddedByteArray;
     }
 
+
     private byte[] concatenateBytes( byte[] array1, byte[] array2 )
     {
-        byte concatenatedBytes[] = new byte[ array1.length + array2.length ];
+        byte concatenatedBytes[] = new byte[array1.length + array2.length];
 
         for ( int i = 0; i < array1.length; i++ )
         {
-            concatenatedBytes[ i ] = array1[ i ];
+            concatenatedBytes[i] = array1[i];
         }
 
         for ( int j = array1.length; j < concatenatedBytes.length; j++ )
         {
-            concatenatedBytes[ j ] = array2[ j - array1.length ];
+            concatenatedBytes[j] = array2[j - array1.length];
         }
 
         return concatenatedBytes;
     }
 
+
     private byte[] calculateChecksum( byte[] data )
     {
         ChecksumEngine digester = getChecksumEngine();
@@ -142,23 +171,25 @@
         return digester.calculateChecksum( data );
     }
 
+
     private byte[] removeBytes( byte[] array, int confounder, int checksum )
     {
-        byte lessBytes[] = new byte[ array.length - confounder - checksum ];
+        byte lessBytes[] = new byte[array.length - confounder - checksum];
 
         int j = 0;
         for ( int i = confounder + checksum; i < array.length; i++ )
         {
-            lessBytes[ j ] = array[ i ];
+            lessBytes[j] = array[i];
             j++;
         }
 
         return lessBytes;
     }
 
+
     private byte[] processBlockCipher( boolean encrypt, byte[] data, byte[] key, byte[] ivec )
     {
-        byte[] returnData = new byte[ data.length ];
+        byte[] returnData = new byte[data.length];
         CBCBlockCipher cbcCipher = new CBCBlockCipher( getBlockCipher() );
         KeyParameter keyParameter = new KeyParameter( key );
 

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/EncryptionEngineFactory.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/EncryptionEngineFactory.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/EncryptionEngineFactory.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/EncryptionEngineFactory.java Fri Feb 10 02:48:07 2006
@@ -16,14 +16,15 @@
  */
 package org.apache.kerberos.crypto.encryption;
 
+
 import org.apache.kerberos.exceptions.ErrorType;
 import org.apache.kerberos.exceptions.KerberosException;
 import org.apache.kerberos.messages.value.EncryptionKey;
 
+
 public class EncryptionEngineFactory
 {
-    public static EncryptionEngine getEncryptionEngineFor( EncryptionKey key )
-            throws KerberosException
+    public static EncryptionEngine getEncryptionEngineFor( EncryptionKey key ) throws KerberosException
     {
         int type = key.getKeyType().getOrdinal();
 

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/EncryptionType.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/EncryptionType.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/EncryptionType.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/EncryptionType.java Fri Feb 10 02:48:07 2006
@@ -16,87 +16,97 @@
  */
 package org.apache.kerberos.crypto.encryption;
 
+
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
+
 public final class EncryptionType implements Comparable
 {
     /**
      * Enumeration elements are constructed once upon class loading.
      * Order of appearance here determines the order of compareTo.
      */
-    public static final EncryptionType UNKNOWN              = new EncryptionType(-1, "UNKNOWN");
-    public static final EncryptionType NULL                 = new EncryptionType(0, "NULL");
-    public static final EncryptionType DES_CBC_CRC          = new EncryptionType(1, "des-cbc-crc");
-    public static final EncryptionType DES_CBC_MD4          = new EncryptionType(2, "des-cbc-md4");
-    public static final EncryptionType DES_CBC_MD5          = new EncryptionType(3, "des-cbc-md5");
-    public static final EncryptionType RESERVED4            = new EncryptionType(4, "[reserved]");
-    public static final EncryptionType DES3_CBC_MD5         = new EncryptionType(5, "des3-cbc-md5");
-    public static final EncryptionType RESERVED6            = new EncryptionType(6, "[reserved]");
-    public static final EncryptionType DES3_CBC_SHA1        = new EncryptionType(7, "des3-cbc-sha1");
-    public static final EncryptionType DSAWITHSHA1_CMSOID   = new EncryptionType(9, "dsaWithSHA1-CmsOID");
-    public static final EncryptionType MD5WITHRSAENCRYPTION_CMSOID  = new EncryptionType(10, "md5WithRSAEncryption-CmsOID");
-    public static final EncryptionType SHA1WITHRSAENCRYPTION_CMSOID = new EncryptionType(11, "sha1WithRSAEncryption-CmsOID");
-    public static final EncryptionType RC2CBC_ENVOID        = new EncryptionType(12, "rc2CBC-EnvOID");
-    public static final EncryptionType RSAENCRYPTION_ENVOID = new EncryptionType(13, "rsaEncryption-EnvOID");
-    public static final EncryptionType RSAES_OAEP_ENV_OID   = new EncryptionType(14, "rsaES-OAEP-ENV-OID");
-    public static final EncryptionType DES_EDE3_CBC_ENV_OID = new EncryptionType(15, "des-ede3-cbc-Env-OID");
-    public static final EncryptionType DES3_CBC_SHA1_KD     = new EncryptionType(16, "des3-cbc-sha1-kd");
-    public static final EncryptionType AES128_CTS_HMAC_SHA1_96 = new EncryptionType(17, "aes128-cts-hmac-sha1-96");
-    public static final EncryptionType AES256_CTS_HMAC_SHA1_96 = new EncryptionType(18, "aes256-cts-hmac-sha1-96");
-    public static final EncryptionType RC4_HMAC             = new EncryptionType(23, "rc4-hmac");
-    public static final EncryptionType RC4_HMAC_EXP         = new EncryptionType(24, "rc4-hmac-exp");
-    public static final EncryptionType SUBKEY_KEYMATERIAL   = new EncryptionType(65, "subkey-keymaterial");
-    public static final EncryptionType RC4_MD4              = new EncryptionType(-128, "rc4-md4");
-    public static final EncryptionType RC4_HMAC_OLD         = new EncryptionType(-133, "rc4-hmac-old");
-    public static final EncryptionType RC4_HMAC_OLD_EXP     = new EncryptionType(-135, "rc4-hmac-old-exp");
+    public static final EncryptionType UNKNOWN = new EncryptionType( -1, "UNKNOWN" );
+    public static final EncryptionType NULL = new EncryptionType( 0, "NULL" );
+    public static final EncryptionType DES_CBC_CRC = new EncryptionType( 1, "des-cbc-crc" );
+    public static final EncryptionType DES_CBC_MD4 = new EncryptionType( 2, "des-cbc-md4" );
+    public static final EncryptionType DES_CBC_MD5 = new EncryptionType( 3, "des-cbc-md5" );
+    public static final EncryptionType RESERVED4 = new EncryptionType( 4, "[reserved]" );
+    public static final EncryptionType DES3_CBC_MD5 = new EncryptionType( 5, "des3-cbc-md5" );
+    public static final EncryptionType RESERVED6 = new EncryptionType( 6, "[reserved]" );
+    public static final EncryptionType DES3_CBC_SHA1 = new EncryptionType( 7, "des3-cbc-sha1" );
+    public static final EncryptionType DSAWITHSHA1_CMSOID = new EncryptionType( 9, "dsaWithSHA1-CmsOID" );
+    public static final EncryptionType MD5WITHRSAENCRYPTION_CMSOID = new EncryptionType( 10,
+        "md5WithRSAEncryption-CmsOID" );
+    public static final EncryptionType SHA1WITHRSAENCRYPTION_CMSOID = new EncryptionType( 11,
+        "sha1WithRSAEncryption-CmsOID" );
+    public static final EncryptionType RC2CBC_ENVOID = new EncryptionType( 12, "rc2CBC-EnvOID" );
+    public static final EncryptionType RSAENCRYPTION_ENVOID = new EncryptionType( 13, "rsaEncryption-EnvOID" );
+    public static final EncryptionType RSAES_OAEP_ENV_OID = new EncryptionType( 14, "rsaES-OAEP-ENV-OID" );
+    public static final EncryptionType DES_EDE3_CBC_ENV_OID = new EncryptionType( 15, "des-ede3-cbc-Env-OID" );
+    public static final EncryptionType DES3_CBC_SHA1_KD = new EncryptionType( 16, "des3-cbc-sha1-kd" );
+    public static final EncryptionType AES128_CTS_HMAC_SHA1_96 = new EncryptionType( 17, "aes128-cts-hmac-sha1-96" );
+    public static final EncryptionType AES256_CTS_HMAC_SHA1_96 = new EncryptionType( 18, "aes256-cts-hmac-sha1-96" );
+    public static final EncryptionType RC4_HMAC = new EncryptionType( 23, "rc4-hmac" );
+    public static final EncryptionType RC4_HMAC_EXP = new EncryptionType( 24, "rc4-hmac-exp" );
+    public static final EncryptionType SUBKEY_KEYMATERIAL = new EncryptionType( 65, "subkey-keymaterial" );
+    public static final EncryptionType RC4_MD4 = new EncryptionType( -128, "rc4-md4" );
+    public static final EncryptionType RC4_HMAC_OLD = new EncryptionType( -133, "rc4-hmac-old" );
+    public static final EncryptionType RC4_HMAC_OLD_EXP = new EncryptionType( -135, "rc4-hmac-old-exp" );
 
     /**
      * These two lines are all that's necessary to export a List of VALUES.
      */
-    private static final EncryptionType[] values = { UNKNOWN, NULL, DES_CBC_CRC, DES_CBC_MD4, DES_CBC_MD5, RESERVED4,
-            DES3_CBC_MD5, RESERVED6, DES3_CBC_SHA1, DSAWITHSHA1_CMSOID, MD5WITHRSAENCRYPTION_CMSOID,
-            SHA1WITHRSAENCRYPTION_CMSOID, RC2CBC_ENVOID, RSAENCRYPTION_ENVOID, RSAES_OAEP_ENV_OID,
-            DES_EDE3_CBC_ENV_OID, DES3_CBC_SHA1_KD, AES128_CTS_HMAC_SHA1_96, AES256_CTS_HMAC_SHA1_96, RC4_HMAC,
-            RC4_HMAC_EXP, SUBKEY_KEYMATERIAL, RC4_MD4, RC4_HMAC_OLD, RC4_HMAC_OLD_EXP };
+    private static final EncryptionType[] values =
+        { UNKNOWN, NULL, DES_CBC_CRC, DES_CBC_MD4, DES_CBC_MD5, RESERVED4, DES3_CBC_MD5, RESERVED6, DES3_CBC_SHA1,
+            DSAWITHSHA1_CMSOID, MD5WITHRSAENCRYPTION_CMSOID, SHA1WITHRSAENCRYPTION_CMSOID, RC2CBC_ENVOID,
+            RSAENCRYPTION_ENVOID, RSAES_OAEP_ENV_OID, DES_EDE3_CBC_ENV_OID, DES3_CBC_SHA1_KD, AES128_CTS_HMAC_SHA1_96,
+            AES256_CTS_HMAC_SHA1_96, RC4_HMAC, RC4_HMAC_EXP, SUBKEY_KEYMATERIAL, RC4_MD4, RC4_HMAC_OLD,
+            RC4_HMAC_OLD_EXP };
 
     public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
 
     private final String name;
     private final int ordinal;
 
+
     /**
      * Private constructor prevents construction outside of this class.
      */
-    private EncryptionType( int ordinal, String name )
+    private EncryptionType(int ordinal, String name)
     {
         this.ordinal = ordinal;
         this.name = name;
     }
 
+
     public static EncryptionType getTypeByOrdinal( int type )
     {
         for ( int ii = 0; ii < values.length; ii++ )
         {
-            if ( values[ ii ].ordinal == type )
+            if ( values[ii].ordinal == type )
             {
-                return values[ ii ];
+                return values[ii];
             }
         }
 
         return UNKNOWN;
     }
 
+
     public int getOrdinal()
     {
         return ordinal;
     }
 
+
     public int compareTo( Object that )
     {
-        return ordinal - ( (EncryptionType) that ).ordinal;
+        return ordinal - ( ( EncryptionType ) that ).ordinal;
     }
+
 
     public String toString()
     {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/NullEncryption.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/NullEncryption.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/NullEncryption.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/crypto/encryption/NullEncryption.java Fri Feb 10 02:48:07 2006
@@ -16,10 +16,12 @@
  */
 package org.apache.kerberos.crypto.encryption;
 
+
 import org.apache.kerberos.crypto.checksum.ChecksumEngine;
 import org.apache.kerberos.crypto.checksum.ChecksumType;
 import org.bouncycastle.crypto.BlockCipher;
 
+
 public class NullEncryption extends EncryptionEngine
 {
     public BlockCipher getBlockCipher()
@@ -27,55 +29,66 @@
         return null;
     }
 
+
     public ChecksumEngine getChecksumEngine()
     {
         return null;
     }
 
+
     public EncryptionType encryptionType()
     {
         return EncryptionType.NULL;
     }
 
+
     public CipherType keyType()
     {
         return CipherType.NULL;
     }
 
+
     public ChecksumType checksumType()
     {
         return ChecksumType.NULL;
     }
 
+
     public int blockSize()
     {
         return 1;
     }
 
+
     public int keySize()
     {
         return 0;
     }
 
+
     public int checksumSize()
     {
         return 0;
     }
 
+
     public int confounderSize()
     {
         return 0;
     }
 
+
     public int minimumPadSize()
     {
         return 0;
     }
 
+
     protected byte[] processBlockCipher( boolean encrypt, byte[] data, byte[] key, byte[] ivec )
     {
         return data;
     }
+
 
     public byte[] calculateChecksum( byte[] plainText )
     {



Mime
View raw message