directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r267485 - /directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/crypto/checksum/ChecksumType.java
Date Sat, 03 Sep 2005 17:00:12 GMT
Author: erodriguez
Date: Sat Sep  3 10:00:05 2005
New Revision: 267485

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

Modified:
    directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/crypto/checksum/ChecksumType.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=267485&r1=267484&r2=267485&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:00:05 2005
@@ -26,19 +26,28 @@
 	 * Enumeration elements are constructed once upon class loading.
 	 * Order of appearance here determines the order of compareTo.
 	 */
-	public static final ChecksumType NULL           = new ChecksumType(0, "null");
+    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");
-	public static final ChecksumType UNKNOWN11      = new ChecksumType(11, "UNKNOWN 11");
-	public static final ChecksumType HMAC_SHA1_DES3 = new ChecksumType(12, "HMAC SHA1 DES3");
+	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()
     {
@@ -56,8 +65,8 @@
         {
             if ( values[ i ].ordinal == type ) return values[ i ];
         }
-        
-        return NULL;
+
+        return UNKNOWN;
     }
 
     public int getOrdinal()
@@ -81,9 +90,10 @@
     /**
      * These two lines are all that's necessary to export a List of VALUES.
      */
-    private static final ChecksumType[] values = { 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, UNKNOWN11,
-            HMAC_SHA1_DES3 };
+    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
) );
 }



Mime
View raw message