Encryption/Decryption
The Core Package provide multiple tools to help you to integrate the API easily on your application.
The Transfer object is a wrapper to handle notification of Upload
and Download
progress from axios.
encryptFile
and decryptFile
accept File
, Stream
and Buffer
as input file.
const transfer = new Transfer({
name: "My Super File",
type: TransferType.UPLOAD,
});
transfer.setAction(() => {
// Any action to do on onDownloadProgress or onUploadProgress
});
// The API Will return you the file encrypted
const result = await encryptFile(
{ password, algorithm },
file,
{ transfer },
);
Last updated