decryptAesGcm128 method

Future<String> decryptAesGcm128(
  1. String encryptedText,
  2. String key,
  3. String nonce

Decrypt data by AES algorithm with GCM mode, and return a plain text

encryptedText is a base64 encoded encrypted string.

key the key string, the length of it should be 128bits(16 bytes)

nonce the base64 encoded nonce string, the length of it should be 92bits(12 bytes), which can be generated by generateNonce() method


static Future<String> decryptAesGcm128(
    String encryptedText, String key, String nonce) async {
  final decrypted = await _channel.invokeMethod("Decrypt_AesGcm128", {
    "data": encryptedText,
    "key": key,
    "nonce": nonce,
  return decrypted;