encryptFileAsync method

Future<Uint8List> encryptFileAsync(
  1. Uint8List clearFile,
  2. String filename
)

Encrypt a clear-text file into an encrypted file, for the recipients of this session.

clearFile - A Uint8List of the clear-text content of the file to encrypt. filename - The name of the file to encrypt. Returns the encrypted file as a Uint8List.

Implementation

Future<Uint8List> encryptFileAsync(Uint8List clearFile, String filename) {
  final _TransferablePointer<NativeSealdEncryptionSession> tPtr = _ptr;
  return compute(
      (Map<String, dynamic> args) => SealdEncryptionSession._(tPtr)
          .encryptFile(args["clearFile"], args["filename"]),
      {"clearFile": clearFile, "filename": filename});
}