Package org.symbol.sdk
Class CipherTypes.AesCbcCipher
java.lang.Object
org.symbol.sdk.CipherTypes.AesCbcCipher
- All Implemented Interfaces:
CipherTypes.SymmetricCipher
- Enclosing class:
CipherTypes
public static final class CipherTypes.AesCbcCipher
extends Object
implements CipherTypes.SymmetricCipher
- AesCbcCipher
- Performs AES CBC encryption and decryption with a given key.
-
Constructor Summary
ConstructorsConstructorDescriptionAesCbcCipher(CryptoTypes.SharedKey256 aesKey) Creates a cipher around an AES shared key. -
Method Summary
-
Constructor Details
-
Method Details
-
encrypt
public byte[] encrypt(byte[] clearText, byte[] iv) - AesCbcCipher.encrypt
- Encrypts clear text.
- Specified by:
encryptin interfaceCipherTypes.SymmetricCipher- Parameters:
clearText- Clear text to encrypt.iv- IV bytes.- Returns:
- Cipher text.
-
decrypt
public byte[] decrypt(byte[] cipherText, byte[] iv) - AesCbcCipher.decrypt
- Decrypts cipher text.
- Specified by:
decryptin interfaceCipherTypes.SymmetricCipher- Parameters:
cipherText- Cipher text to decrypt.iv- IV bytes.- Returns:
- Clear text.
-