encryptBytesWithAes static method
Encrypts the given data
with AES using the specified key
.
Implementation
static Uint8List encryptBytesWithAes(Uint8List data, Uint8List key) {
final ecbChiper = PaddedBlockCipher('AES/ECB/PKCS7');
final params = PaddedBlockCipherParameters(KeyParameter(key), null);
ecbChiper.init(true, params);
return ecbChiper.process(data);
}