aesDecode static method

String aesDecode({
  1. required String content,
  2. required String key,
})

aes解密

Implementation

static String aesDecode({required String content, required String key}) {
  final secretKey = encrypt.Key.fromUtf8(key);
  final encrypter = encrypt.Encrypter(
    encrypt.AES(secretKey, mode: encrypt.AESMode.ecb, padding: 'PKCS7'),
  );
  final decrypted = encrypter.decrypt(encrypt.Encrypted.fromBase64(content));
  return decrypted;
}