decrypt static method
AES/CBC/ZeroByte Decrypt
Implementation
static Uint8List decrypt(Uint8List encrypted, {Uint8List? key, Uint8List? iv}) {
registry.register(ZeroBytePadding.FACTORY_CONFIG);
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/ZeroByte");
decryptionCipher.init(false, params);
return decryptionCipher.process(encrypted);
}