directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: rev 57041 - incubator/directory/kerberos/trunk/kerberos/src/java/org/apache/kerberos/crypto
Date Tue, 09 Nov 2004 14:19:37 GMT
Author: erodriguez
Date: Tue Nov  9 06:19:36 2004
New Revision: 57041

Modified:
   incubator/directory/kerberos/trunk/kerberos/src/java/org/apache/kerberos/crypto/CryptoService.java
Log:
Removed unused method.

Modified: incubator/directory/kerberos/trunk/kerberos/src/java/org/apache/kerberos/crypto/CryptoService.java
==============================================================================
--- incubator/directory/kerberos/trunk/kerberos/src/java/org/apache/kerberos/crypto/CryptoService.java
(original)
+++ incubator/directory/kerberos/trunk/kerberos/src/java/org/apache/kerberos/crypto/CryptoService.java
Tue Nov  9 06:19:36 2004
@@ -24,10 +24,10 @@
 
 import javax.security.auth.kerberos.KerberosKey;
 import javax.security.auth.kerberos.KerberosPrincipal;
+import java.security.SecureRandom;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
-import java.security.SecureRandom;
 
 public class CryptoService {
 
@@ -68,14 +68,7 @@
 		DesStringToKey subSessionKey = new DesStringToKey(new String(confounder));
 		return new EncryptionKey(EncryptionType.DES_CBC_MD5, subSessionKey.getKey());
 	}
-
-	public static byte[] getEncryptedTimestamp(EncryptionKey key, Date date)
-			throws KerberosException {
-		EncryptionEngine encryptionEngine = getInstance(key.getKeyType());
-		byte[] plaintext = long2octet(date.getTime());
-		return encryptionEngine.encrypt(plaintext, key.getKeyValue());
-	}
-
+    
     public static KerberosKey getRandomKeyFor(KerberosPrincipal principal)
     {
         final int DES_KEY_TYPE = 3;
@@ -86,7 +79,7 @@
 
 		return new KerberosKey( principal, randomKey.getKey(), DES_KEY_TYPE, keyVersion );
     }
-    
+
 	public byte[] decrypt(EncryptionKey key, EncryptedData data) throws KerberosException {
 		// TODO - check for matching encryptionType and keyVersion
 		EncryptionEngine type = getInstance(key.getKeyType());

Mime
View raw message