encryptString function

String encryptString({
  1. required String string,
  2. required File outputFile,
  3. String? encryptionKey,
})

Encrypt the given string to the given outputFile, and return the encryption key.

Implementation

String encryptString({
  required final String string,
  required final File outputFile,
  final String? encryptionKey,
}) =>
    encryptBytes(
      bytes: utf8.encode(string),
      outputFile: outputFile,
      encryptionKey: encryptionKey,
    );