# encrypt

Encrypts the provided data using a specific encryption type.

### Usage

```ts
import { EncryptionType } from '@4thtech-sdk/types';

const dataToEncrypt = new ArrayBuffer(8);
const encryptedData = await encryptionHandler.encrypt(dataToEncrypt, EncryptionType.AES);
```

### Returns

`Promise<ArrayBuffer>`

A promise that resolves with the encrypted version of the provided data, securely transformed using the specified encryption type.

### Parameters

#### data

* **Type** `ArrayBuffer`

The raw data that you want to encrypt. It can be of any content type, as long as it's in the ArrayBuffer format.

#### encryptionType

* **Type** `EncryptionType`

The type of encryption you want to use to secure the data. It should be one of the encryption types supported by the EncryptionHandler.
