decryptString method

  1. @override
Future<String?> decryptString(
  1. String inputEncoding,
  2. String encryptedString,
  3. String key,
  4. String nonce,
  5. String tag,
)
override

this method takes inputs in base64 or hex encoding string depending on inputEncoding

Implementation

@override
Future<String?> decryptString(String inputEncoding, String encryptedString,
    String key, String nonce, String tag) async {
  final encryptedObj =
      await methodChannel.invokeMethod<String>('decryptString', {
    'inputEncoding': inputEncoding,
    'encryptedString': encryptedString,
    'key': key,
    'nonce': nonce,
    'tag': tag
  });
  return encryptedObj;
}