encryptFile method
Encrypts the file at inputPath and writes the result to outputPath.
Implementation
@override
Future<bool> encryptFile({
required String inputPath,
required String outputPath,
required String key,
String? iv,
}) async {
try {
final inputBytes = await _readFile(inputPath);
final encryptedBytes = await encryptBytes(plainBytes: inputBytes, key: key, iv: iv);
_virtualFileSystem[outputPath] = encryptedBytes;
return true;
} catch (e, st) {
dev.log('encryptFile failed: $e', name: 'AesEncryptFileWeb', error: e, stackTrace: st);
return false;
}
}