> For the complete documentation index, see [llms.txt](https://wiki.4thtech.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.4thtech.io/sdk-and-white-label/encryption-1/encryption-handler.md).

# EncryptionHandler

{% hint style="info" %}
Reference for SDK 0.5.x (maintenance mode). See [Status](/sdk-and-white-label/status.md).
{% endhint %}

Class responsible for handling different encryption implementations. It provides functionalities to encrypt and decrypt data based on the specified encryption type, allowing you to manage and use multiple encryption algorithms seamlessly.

### Usage

Below is a minimal example of how to initialize EncryptionHandler.

```ts
import { EncryptionHandler } from '@4thtech-sdk/encryption';

const encryptionHandler = new EncryptionHandler({
  encryptionImplementations: [
    /* array of encryption implementations */
  ],
});
```

### Parameters

#### config

* **Type** `EncryptionHandlerConfig`

The configuration object required to initialize the EncryptionHandler.

#### config.encryptionImplementations

* **Type** `Encryption[]`

An array of encryption implementations. Each implementation provides the necessary methods to encrypt and decrypt data.
