---
schema_version: "1"
id: d1f4e02625576a4dd715489973d34d9af1b0b9035743ad026c4928e55fd52b99
title: HMAC (dw::util::jwt::HMAC)
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/latest/dw-hmac.md
canonical_url: https://docs.mulesoft.com/dataweave/latest/dw-hmac
source_site: docs.mulesoft.com
content_type: documentation
content_hash: a1139d9d9ff592911dd6798f91e9a6640c089c86176d84e1606e1acdf8801d90
description: MuleSoft Documentation Site
release: "2.13"
latest: true
---
---
product: DataWeave
version: 2.13
is-latest-version: true
---

# HMAC (dw::util::jwt::HMAC)

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

This module provides functionality to create signed JSON Web Tokens using HMAC.

The supported HMAC algorithms are:

- HS256

- HS384

- HS512

Signing keys must be at least 256, 384, and 512 bits long for HS256, HS384, and HS512, respectively.

To use this module, import it to your DataWeave code. For example, by adding the line
`import * from dw::util::jwt::HMAC` to the header of your DataWeave script.

_Introduced in DataWeave version 2.6.0._

## Functions

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><a href="https://docs.mulesoft.com/dataweave/latest/dw-hmac-functions-jwt">JWT</a></p></td><td><p>Generate JWT with header, payload, and signature by specific algorithm.</p></td></tr></tbody></table>

## Variables

- [HMAC Variables](https://docs.mulesoft.com/dataweave/latest/dw-hmac-variables)
