decryptWithAes static method

Uint8List decryptWithAes(
  1. Uint8List data,
  2. Uint8List key
)

Decrypts the given data with AES using the specified key.

Implementation

static Uint8List decryptWithAes(Uint8List data, Uint8List key) {
  final ecbChiper = PaddedBlockCipher('AES/ECB/PKCS7');
  final params = PaddedBlockCipherParameters(KeyParameter(key), null);
  ecbChiper.init(false, params);

  return ecbChiper.process(data);
}