encryptAesGcm method
Encrypts the given plainText
using AES-GCM with the provided masterKey
.
Returns the encrypted cipher text as a Base64 encoded string.
Throws UnimplementedError if not overridden by the platform implementation.
Implementation
@override
Future<String> encryptAesGcm(String masterKey, String plainText) async {
final encryptedData = await methodChannel.invokeMethod<String>('encryptAesGcm', {
'masterKey': masterKey,
'plainText': plainText,
});
return encryptedData ?? "NA";
}