public class SymmetricCryptoEngine extends Object implements EncryptionEngine
| Constructor and Description |
|---|
SymmetricCryptoEngine(String cipherName,
Key key) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decrypt(byte[] input,
byte[] initVector)
Decrypts given input using given initialization vector (if needed)
|
byte[] |
encrypt(byte[] input,
byte[] initVector)
Encrypts given input and using given initialization vector (if needed).
|
public SymmetricCryptoEngine(String cipherName, Key key) throws EncryptionException
EncryptionExceptionpublic byte[] encrypt(byte[] input,
byte[] initVector)
throws EncryptionException
EncryptionEngineencrypt in interface EncryptionEngineinput - input to be encryptedinitVector - initialization vector for encryption if needed (can be null)EncryptionException - exception if encryption failspublic byte[] decrypt(byte[] input,
byte[] initVector)
EncryptionEnginedecrypt in interface EncryptionEngineinput - input to be decryptedinitVector - initialization vector for decryption if needed (can be null)Copyright © 2016. All rights reserved.