SealdAnonymousEncryptionSession_DecryptFile method

int SealdAnonymousEncryptionSession_DecryptFile(
  1. Pointer<NativeSealdAnonymousEncryptionSession> aes,
  2. Pointer<Uint8> encryptedFile,
  3. int encryptedFileLen,
  4. Pointer<Pointer<NativeSealdClearFile>> result,
  5. Pointer<Pointer<NativeSealdError>> error,
)

Decrypts an encrypted file into the corresponding clear-text file.

@param aes The SealdAnonymousEncryptionSession instance. @param encryptedFile An array of bytes of the content of the encrypted file to decrypt. @param encryptedFileLen The length of encryptedFile. @param result A pointer to a SealdClearFile* to store the resulting decrypted file. @param error A pointer to a SealdError* where details will be stored in case of error. @return Error code: -1 if an error happened, 0 for success.

Implementation

int SealdAnonymousEncryptionSession_DecryptFile(
  ffi.Pointer<NativeSealdAnonymousEncryptionSession> aes,
  ffi.Pointer<ffi.Uint8> encryptedFile,
  int encryptedFileLen,
  ffi.Pointer<ffi.Pointer<NativeSealdClearFile>> result,
  ffi.Pointer<ffi.Pointer<NativeSealdError>> error,
) {
  return _SealdAnonymousEncryptionSession_DecryptFile(
    aes,
    encryptedFile,
    encryptedFileLen,
    result,
    error,
  );
}