encryptToBase64 method
Implementation
String encryptToBase64({
required String text,
String? key,
String? iv,
}) {
iv ??= defaultIv;
key ??= defaultKey;
final encrypter = Encrypter(AES(Key.fromUtf8(key)));
return encrypter.encrypt(text, iv: IV.fromBase64(iv)).base64;
}