---
title: "HMAC Create"
description: "Create an HMAC signature of a value using a secret."
canonical_url: "https://docs.vettero.com/build/workflows/blocks/crypto/hmac-create"
---
# HMAC Create

> Create an HMAC signature of a value using a secret.

<block-meta block="Yes" channels="Any" folder="crypto" group="Crypto" groupTo="/build/workflows/blocks/crypto" icon="i-lucide-key" pipe="Value" scope="Any" tool="Yes" type="crypto.hmac.create">



</block-meta>

**HMAC Create** signs **Value** with **Secret** and writes the signature to the data pipe. Use [HMAC Verify](https://docs.vettero.com/build/workflows/blocks/crypto/hmac-verify) to check a signature from a webhook header.

## Configure

<table>
<thead>
  <tr>
    <th>
      Setting
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Value
      </strong>
    </td>
    
    <td>
      Body or text to sign (required)
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Secret
      </strong>
    </td>
    
    <td>
      Shared secret. Prefer a workspace env key (required)
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Algorithm
      </strong>
    </td>
    
    <td>
      <strong>
        SHA-256
      </strong>
      
       (default), <strong>
        SHA-384
      </strong>
      
      , <strong>
        SHA-512
      </strong>
      
      , or <strong>
        SHA-1
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Encoding
      </strong>
    </td>
    
    <td>
      <strong>
        Hex
      </strong>
      
       (default), <strong>
        Base64
      </strong>
      
      , or <strong>
        Base64 URL
      </strong>
    </td>
  </tr>
</tbody>
</table>

## Handles

<table>
<thead>
  <tr>
    <th>
      Handle
    </th>
    
    <th>
      Role
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        In
      </strong>
      
       (target)
    </td>
    
    <td>
      Incoming connection
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Out
      </strong>
      
       (source)
    </td>
    
    <td>
      Continues after signing
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Error
      </strong>
    </td>
    
    <td>
      Catchable failures: missing secret (<code>
        MISSING_VALUE
      </code>
      
      )
    </td>
  </tr>
</tbody>
</table>

Connect [Branch errors](https://docs.vettero.com/build/workflows/blocks/error/branch) to **Error** to split those codes.

## Pipe schema

The next block reads this on the data pipe (`pipe.value`). The value is `text` (the signature).

## Use case

- Sign an outbound HTTP body before an [API](https://docs.vettero.com/build/workflows/blocks/utility/api) call.
- Produce the same digest a partner expects in `X-Signature`.

<block-page-nav>



</block-page-nav>


## Sitemap

See the full [sitemap](https://docs.vettero.com/sitemap.md) for all pages.
