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

# hmacSign

> Function hmacSign in the Baileys API.

> **hmacSign**(`buffer`, `key`, `variant`): `NonSharedBuffer`

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

## Parameters

### buffer

`Uint8Array`\<`ArrayBufferLike`> | `Buffer`\<`ArrayBufferLike`>

### key

`Uint8Array`\<`ArrayBufferLike`> | `Buffer`\<`ArrayBufferLike`>

### variant

`"sha256"` | `"sha512"`

## Returns

`NonSharedBuffer`
