decrypt static method
AES/CBC/PKCS7 Decrypt
Implementation
static Uint8List decrypt(Uint8List encrypted, {Uint8List? key, Uint8List? iv}) {
if (key == null) {
key = Uint8List(1);
}
if (iv == null) {
iv = Uint8List(1);
}
CipherParameters params = PaddedBlockCipherParameters(
ParametersWithIV(KeyParameter(key), iv), null);
BlockCipher decryptionCipher = PaddedBlockCipher("AES/CBC/PKCS7");
decryptionCipher.init(false, params);
return decryptionCipher.process(encrypted);
}