aesEncode static method

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

aes加密 keyAesCrypt加密key content 需要加密的内容字符串

Implementation

static String aesEncode({required String key, required String content}) {
  var aesEncrypter = AesCrypt(
      key: base64UrlEncode(key.codeUnits), padding: PaddingAES.pkcs7);
  return aesEncrypter.ecb.encrypt(inp: content);
}