directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r267487 - in /directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/crypto: checksum/ChecksumType.java encryption/CipherType.java
Date Sat, 03 Sep 2005 17:33:17 GMT
Author: erodriguez
Date: Sat Sep  3 10:33:11 2005
New Revision: 267487

URL: http://svn.apache.org/viewcvs?rev=267487&view=rev
Log:
Formatting:  imports, whitespace, line breaks, or other code convention.

Modified:
    directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/crypto/checksum/ChecksumType.java
    directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/crypto/encryption/CipherType.java

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/crypto/checksum/ChecksumType.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/crypto/checksum/ChecksumType.java?rev=267487&r1=267486&r2=267487&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/crypto/checksum/ChecksumType.java
(original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/crypto/checksum/ChecksumType.java
Sat Sep  3 10:33:11 2005
@@ -27,43 +27,52 @@
 	 * 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 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");
-    public static final ChecksumType RC4_HMAC            = new ChecksumType(23, "rc4-hmac");
-    public static final ChecksumType RC4_HMAC_EXP        = new ChecksumType(24, "rc4-hmac-exp");
-    public static final ChecksumType RC4_MD4             = new ChecksumType(-128, "rc4-md4");
-    public static final ChecksumType RC4_HMAC_OLD        = new ChecksumType(-133, "rc4-hmac-old");
-    public static final ChecksumType RC4_HMAC_OLD_EXP    = new ChecksumType(-135, "rc4-hmac-old-exp");
 
-	public String toString()
-    {
-        return name;
-    }
+    /**
+     * 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 };
+    // VALUES needs to be located here, otherwise illegal forward reference
+    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values
) );
 
-    public int compareTo( Object that )
+    private final String name;
+    private final int ordinal;
+
+    /**
+     * Private constructor prevents construction outside of this class.
+     */
+    private ChecksumType( int ordinal, String name )
     {
-        return ordinal - ( (ChecksumType) that ).ordinal;
+        this.ordinal = ordinal;
+        this.name = name;
     }
 
     public static ChecksumType getTypeByOrdinal( int type )
     {
-        for ( int i = 0; i < values.length; i++ )
+        for ( int ii = 0; ii < values.length; ii++ )
         {
-            if ( values[ i ].ordinal == type ) return values[ i ];
+            if ( values[ ii ].ordinal == type )
+            {
+                return values[ ii ];
+            }
         }
 
         return UNKNOWN;
@@ -74,26 +83,13 @@
         return ordinal;
     }
 
-    /// PRIVATE /////
-    private final String name;
-    private final int ordinal;
-
-    /**
-     * Private constructor prevents construction outside of this class.
-     */
-    private ChecksumType( int ordinal, String name )
+    public int compareTo( Object that )
     {
-        this.ordinal = ordinal;
-        this.name = name;
+        return ordinal - ( (ChecksumType) that ).ordinal;
     }
 
-    /**
-     * 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,
-            RC4_HMAC, RC4_HMAC_EXP, RC4_MD4, RC4_HMAC_OLD, RC4_HMAC_OLD_EXP };
-    // VALUES needs to be located here, otherwise illegal forward reference
-    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values
) );
+    public String toString()
+    {
+        return name;
+    }
 }

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/crypto/encryption/CipherType.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/crypto/encryption/CipherType.java?rev=267487&r1=267486&r2=267487&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/crypto/encryption/CipherType.java
(original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/crypto/encryption/CipherType.java
Sat Sep  3 10:33:11 2005
@@ -22,33 +22,22 @@
 
 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 AES128 = new CipherType("AES128");
-
-	public String toString()
-    {
-        return name;
-    }
-
-    public int compareTo( Object that )
-    {
-        return ordinal - ( (CipherType) that ).ordinal;
-    }
+    /**
+     * 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 AES128 = new CipherType( "AES128" );
 
-    public CipherType getTypeByOrdinal( int type )
-    {
-        for ( int i = 0; i < values.length; i++ )
-            if ( values[ i ].ordinal == type ) return values[ i ];
-        return NULL;
-    }
+    /**
+     * These two lines are all that's necessary to export a List of VALUES.
+     */
+    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
) );
 
-    /// PRIVATE /////
     private final String name;
     private static int nextOrdinal = 0;
     private final int ordinal = nextOrdinal++;
@@ -61,10 +50,26 @@
         this.name = name;
     }
 
-    /**
-     * These two lines are all that's necessary to export a List of VALUES.
-     */
-    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
) );
+    public CipherType getTypeByOrdinal( int type )
+    {
+        for ( int ii = 0; ii < values.length; ii++ )
+        {
+            if ( values[ ii ].ordinal == type )
+            {
+                return values[ ii ];
+            }
+        }
+
+        return NULL;
+    }
+
+    public int compareTo( Object that )
+    {
+        return ordinal - ( (CipherType) that ).ordinal;
+    }
+
+    public String toString()
+    {
+        return name;
+    }
 }



Mime
View raw message