Class EcbAesCipher
- java.lang.Object
- 
- org.activecomponents.udp.symciphers.EcbAesCipher
 
- 
- All Implemented Interfaces:
- ISymCipher
 
 public class EcbAesCipher extends java.lang.Object implements ISymCipher Implementation of AES in ECB mode. Insecure in most cases, for testing purposes only.
- 
- 
Constructor SummaryConstructors Constructor Description EcbAesCipher(byte[] key, Nonce nonce)Creates the cipher with the given key.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]decrypt(byte[] cipher)Decrypts a message.byte[]decrypt(byte[] cipher, int offset, int len)Decrypts a message.byte[]encrypt(byte[] plain)Encrypts a message.byte[]encrypt(byte[] plain, int offset, int len)Encrypts a message.
 
- 
- 
- 
Constructor Detail- 
EcbAesCipherpublic EcbAesCipher(byte[] key, Nonce nonce)Creates the cipher with the given key.
 
- 
 - 
Method Detail- 
encryptpublic byte[] encrypt(byte[] plain) Encrypts a message.- Specified by:
- encryptin interface- ISymCipher
- Parameters:
- plain- Plain text.
- Returns:
- Cipher text.
 
 - 
encryptpublic byte[] encrypt(byte[] plain, int offset, int len)Encrypts a message.- Specified by:
- encryptin interface- ISymCipher
- Parameters:
- plain- Plain text.
- offset- Offset where the plain text starts.
- len- Length of the plain text, -1 for rest of the array.
- Returns:
- Cipher text.
 
 - 
decryptpublic byte[] decrypt(byte[] cipher) Decrypts a message.- Specified by:
- decryptin interface- ISymCipher
- Parameters:
- cipher- Cipher text.
- Returns:
- Plain text.
 
 - 
decryptpublic byte[] decrypt(byte[] cipher, int offset, int len)Decrypts a message.- Specified by:
- decryptin interface- ISymCipher
- Parameters:
- cipher- Cipher text.
- offset- Offset where the cipher text starts.
- len- Length of the cipher text, -1 for rest of the array.
- Returns:
- Plain text.
 
 
- 
 
-