encrypt method Null safety
override
Encrypts string
using a key
generated from generateRandomKey or
generateKeyFromPassword. The returned string is a sequence of 3
base64-encoded strings (iv, mac and cipherText) and can be transferred and
stored almost anywhere.
Implementation
@override
Future<String?> encrypt(String string, String key) async =>
await _channel.invokeMethod("encrypt", {
"string": string,
"key": key,
});