encryptFile method

  1. @override
Future<bool> encryptFile({
  1. required String inputPath,
  2. required String outputPath,
  3. required String key,
  4. String? iv,
})
override

Implementation

@override
Future<bool> encryptFile({required String inputPath, required String outputPath, required String key, String? iv}) async{
  try {
    final Map<String, dynamic> args = {
      'inputPath': inputPath,
      'outputPath': outputPath,
      'key': key,
    };
    if (iv != null) {
      args['iv'] = iv;
    }
    final bool result = await methodChannel.invokeMethod('encryptFile', args);
    return result;
  } on PlatformException {
    return false;
  }
}