> For the complete documentation index, see [llms.txt](https://abyss-project.gitbook.io/abyss-crypt/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://abyss-project.gitbook.io/abyss-crypt/setup/encryption-decryption.md).

# 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.

<mark style="color:blue;">`encryptFile`</mark> and <mark style="color:blue;">`decryptFile`</mark> accept <mark style="color:orange;">`File`</mark>, <mark style="color:orange;">`Stream`</mark> and <mark style="color:orange;">`Buffer`</mark> as input file.

{% code overflow="wrap" lineNumbers="true" %}

```typescript
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 },
);
```

{% endcode %}
