directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r267488 - /directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/crypto/encryption/EncryptionType.java
Date Sat, 03 Sep 2005 17:34:05 GMT
Author: erodriguez
Date: Sat Sep  3 10:34:02 2005
New Revision: 267488

URL: http://svn.apache.org/viewcvs?rev=267488&view=rev
Log:
Updated the list of possible encryption types.

Modified:
    directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/crypto/encryption/EncryptionType.java

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/crypto/encryption/EncryptionType.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/crypto/encryption/EncryptionType.java?rev=267488&r1=267487&r2=267488&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/crypto/encryption/EncryptionType.java
(original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/crypto/encryption/EncryptionType.java
Sat Sep  3 10:34:02 2005
@@ -26,33 +26,40 @@
      * Enumeration elements are constructed once upon class loading.
      * Order of appearance here determines the order of compareTo.
      */
-    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-4");
-    public static final EncryptionType DES3_CBC_MD5         = new EncryptionType(5, "DES3-CBC-MD5");
-    public static final EncryptionType RESERVED6            = new EncryptionType(6, "RESERVED-6");
-    public static final EncryptionType DES3_CBC_SHA1        = new EncryptionType(7, "DES3-CBC-SHA1");
-    public static final EncryptionType DES3_CBC_SHA1_KD     = new EncryptionType(8, "DES3-CBC-SHA1-KD");
-    public static final EncryptionType DSAWITHSHA1_CMSOID   = new EncryptionType(9, "DSA-with-SHA1-CMS-oid");
-    public static final EncryptionType MD5WITHRSAENCRYPTION_CMSOID  = new EncryptionType(10,
"MD5-with-RSA-encryption-CMS-oid");
-    public static final EncryptionType SHA1WITHRSAENCRYPTION_CMSOID = new EncryptionType(11,
"SHA1-with-RSA-encryption-CMS-oid");
-    public static final EncryptionType RC2CBC_ENVOID        = new EncryptionType(12, "RC2-CBC-environment-oid");
-    public static final EncryptionType RSAENCRYPTION_ENVOID = new EncryptionType(13, "RSA-encryption-environment-oid");
-    public static final EncryptionType RSAES_OAEP_ENV_OID   = new EncryptionType(14, "RSA-ES-OAEP-environment-oid");
-    public static final EncryptionType DES_EDE3_CBC_ENV_OID = new EncryptionType(15, "DES-EDE3-CBC-environment-oid");
-    public static final EncryptionType RC4_HMAC             = new EncryptionType(16, "RC4-HMAC");
-    public static final EncryptionType PK_CROSS             = new EncryptionType(17, "PK-cross");
+    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 = { NULL, DES_CBC_CRC, DES_CBC_MD4, DES_CBC_MD5,
-            RESERVED4, DES3_CBC_MD5, RESERVED6, DES3_CBC_SHA1, DES3_CBC_SHA1_KD,
-            DSAWITHSHA1_CMSOID, MD5WITHRSAENCRYPTION_CMSOID, SHA1WITHRSAENCRYPTION_CMSOID,
-            RC2CBC_ENVOID, RSAENCRYPTION_ENVOID, RSAES_OAEP_ENV_OID, DES_EDE3_CBC_ENV_OID,
-            RC4_HMAC, PK_CROSS };
+    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
) );
 
@@ -78,7 +85,7 @@
             }
         }
 
-        return NULL;
+        return UNKNOWN;
     }
 
     public int getOrdinal()
@@ -86,13 +93,13 @@
         return ordinal;
     }
 
-    public String toString()
+    public int compareTo( Object that )
     {
-        return name + " (" + ordinal + ")";
+        return ordinal - ( (EncryptionType) that ).ordinal;
     }
 
-    public int compareTo( Object that )
+    public String toString()
     {
-        return ordinal - ( (EncryptionType) that ).ordinal;
+        return name + " (" + ordinal + ")";
     }
 }



Mime
View raw message