decryptAesGcm method

  1. @override
Future<String> decryptAesGcm(
  1. String masterKey,
  2. String cipherText
)
override

Decrypts the given cipherText using AES-GCM with the provided masterKey.

Returns the decrypted plain text as a string.

Throws UnimplementedError if not overridden by the platform implementation.

Implementation

@override
Future<String> decryptAesGcm(String masterKey, String cipherText) async {
  final decryptedData = await methodChannel.invokeMethod<String>('decryptAesGcm', {
    'masterKey': masterKey,
    'cipherText': cipherText,
  });
  return decryptedData ?? "NA";
}