encode static method
encode a message
AESEncryptor.encode('message');
Implementation
static String encode(String content, String secret) {
String plainText = base64.encode(utf8.encode(content));
Key key = Key.fromUtf8(secret);
Encrypter encrypter = Encrypter(AES(key));
Encrypted encrypted = encrypter.encrypt(plainText, iv: iv);
return encrypted.base64;
}