strEncode method
Implementation
String strEncode(String str) {
final keyValue = Key.fromUtf8(key);
final ivValue = IV.fromUtf8(iv);
final encrypter = Encrypter(AES(keyValue, mode: AESMode.cbc));
final res = encrypter.encrypt(str, iv: ivValue);
// print('str: $str\nkey: ${this.key}\niv: ${this.iv}\nsession_key: ${getSessionKey()}\ndata: ${res.base64}');
return res.base64;
}