> ## Documentation Index
> Fetch the complete documentation index at: https://baileys.wiki/llms.txt
> Use this file to discover all available pages before exploring further.

# aesEncrypt

> Function aesEncrypt in the Baileys API.

> **aesEncrypt**(`buffer`, `key`): `Buffer`\<`ArrayBuffer`>

Defined in: [src/Utils/crypto.ts:97](https://github.com/WhiskeySockets/Baileys/blob/master/src/Utils/crypto.ts#L97)

## Parameters

### buffer

`Uint8Array`

### key

`Uint8Array`

## Returns

`Buffer`\<`ArrayBuffer`>
