Package com.uc4.util
Class AES
- java.lang.Object
-
- com.uc4.util.AES
-
public final class AES extends java.lang.ObjectRijndael.java- Version:
- 1.0 (May 2001) Optimised Java implementation of the Rijndael (AES) block cipher.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAES.Modeencryption operating modes
-
Constructor Summary
Constructors Constructor Description AES()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidCMNDecrypt(byte[] buf, int start, int len, byte[] IV)used to decrypt a byte buffer.voidCMNEncrypt(byte[] buf, int start, int len, byte[] IV)used to encrypt a byte buffer.voidencFree()used to free allocated resources.protected voidfinalize()Destroy all sensitive information in this object.voidinitializeEnc(byte[] Key, int KeyLen, AES.Mode m)initialize the encryption class.
-
-
-
Method Detail
-
initializeEnc
public void initializeEnc(byte[] Key, int KeyLen, AES.Mode m)initialize the encryption class. to encrypt useCMNEncryptto decrypt useCMNDecrypt- Parameters:
Key- the key to be usedKeyLen- the active key lengthm- the operation mode CBC - ECB
-
CMNEncrypt
public void CMNEncrypt(byte[] buf, int start, int len, byte[] IV)used to encrypt a byte buffer. useInitializeEncto initialize the class.- Parameters:
buf- the byte buffer to be encryptedstart- the encryption start position in the byte bufferlen- the length to be encryptedIV- the initial vector to be used
-
CMNDecrypt
public void CMNDecrypt(byte[] buf, int start, int len, byte[] IV)used to decrypt a byte buffer. useInitializeEncto initialize the class.- Parameters:
buf- the byte buffer to be decryptedstart- the decryption start position in the byte bufferlen- the length to be decryptedIV- the initial vector to be used
-
encFree
public void encFree()
used to free allocated resources. and sensitive data will be wiped out
-
finalize
protected final void finalize()
Destroy all sensitive information in this object.- Overrides:
finalizein classjava.lang.Object
-
-