aesCbcEncrypt static method

List<int> aesCbcEncrypt(
  1. List<int> key,
  2. List<int> data, {
  3. PaddingAlgorithm? paddingAlgorithm,
})

Encrypt the input data using AES in Cipher Block Chaining (CBC) mode with the provided key. Optionally, specify the padding algorithm to be used.

Implementation

static List<int> aesCbcEncrypt(List<int> key, List<int> data,
    {PaddingAlgorithm? paddingAlgorithm}) {
  final ecb = ECB(key);
  return ecb.encryptBlock(data, null, paddingAlgorithm);
}