encryptFile function

String encryptFile({
  1. required File inputFile,
  2. required File outputFile,
  3. String? encryptionKey,
})

Encrypt the given inputFile into the given outputFile, and return the encryption key.

Implementation

String encryptFile({
  required final File inputFile,
  required final File outputFile,
  final String? encryptionKey,
}) =>
    encryptBytes(
      bytes: inputFile.readAsBytesSync(),
      outputFile: outputFile,
      encryptionKey: encryptionKey,
    );