directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: rev 56470 - incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/crypto
Date Wed, 03 Nov 2004 04:16:20 GMT
Author: erodriguez
Date: Tue Nov  2 20:16:19 2004
New Revision: 56470

Modified:
   incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/crypto/CryptoService.java
Log:
Closed access to a method that did not properly pad data prior to encryption.

Modified: incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/crypto/CryptoService.java
==============================================================================
--- incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/crypto/CryptoService.java
(original)
+++ incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/crypto/CryptoService.java
Tue Nov  2 20:16:19 2004
@@ -86,12 +86,7 @@
 		byte[] plaintext = OctetUtils.long2octet(date.getTime());
 		return encryptionEngine.encrypt(plaintext, key.getKeyValue());
 	}
-
-	public byte[] encrypt(EncryptionKey key, byte[] plaintext) throws KerberosException {
-		EncryptionEngine encryptionEngine = getInstance(key.getKeyType());
-		return encryptionEngine.encrypt(plaintext, key.getKeyValue());
-	}
-
+	
 	public EncryptionKey getEncryptionKey(String password, String realm, String username) {
 		DesStringToKey key = new DesStringToKey(password, realm, username);
 		byte[] keyBytes = key.getKey();
@@ -129,6 +124,11 @@
 	
 	// TODO - The classes below are key production util code and I can picture them moving
 	//        to a key production base class when I add DES3 and/or AES support.
+	
+	private byte[] encrypt(EncryptionKey key, byte[] plaintext) throws KerberosException {
+		EncryptionEngine encryptionEngine = getInstance(key.getKeyType());
+		return encryptionEngine.encrypt(plaintext, key.getKeyValue());
+	}
 	
 	private byte[] padString(byte encodedString[]) {
 		int x;

Mime
View raw message