encryptString method

  1. @override
Future<Map?> encryptString(
  1. String string,
  2. String key,
  3. String keyEncoding,
  4. String outputEncoding,
)
override

key must be in base64 or hex encoding string depending on keyEncoding, outputEncoding should be in "base64" or "hex"

Implementation

@override
Future<Map?> encryptString(String string, String key, String keyEncoding,
    String outputEncoding) async {
  final encryptedObj =
      await methodChannel.invokeMethod<Map>('encryptString', {
    'string': string,
    'key': key,
    'keyEncoding': keyEncoding,
    'outputEncoding': outputEncoding
  });
  return encryptedObj;
}