---
title: "HMAC Verify"
description: "Verify an HMAC signature. Mismatch fails the block."
canonical_url: "https://docs.vettero.com/build/workflows/blocks/crypto/hmac-verify"
---
# HMAC Verify

> Verify an HMAC signature. Mismatch fails the block.

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



</block-meta>

**HMAC Verify** recomputes the HMAC of **Value** with **Secret** and compares it to **Signature**. The compare is timing-safe. A mismatch does **not** continue on the success outlet.

## Configure

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

<tbody>
  <tr>
    <td>
      <strong>
        Value
      </strong>
    </td>
    
    <td>
      Signed body or text (required)
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Secret
      </strong>
    </td>
    
    <td>
      Shared secret. Prefer a workspace env key (required)
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Signature
      </strong>
    </td>
    
    <td>
      Expected signature, usually a request header (required)
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Algorithm
      </strong>
    </td>
    
    <td>
      Must match how the signature was created
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Encoding
      </strong>
    </td>
    
    <td>
      Must match how the signature was encoded
    </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 only when the signature matches
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Error
      </strong>
    </td>
    
    <td>
      Catchable failures: missing secret (<code>
        MISSING_VALUE
      </code>
      
      ) or signature mismatch (<code>
        HMAC_INVALID
      </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

On success the pipe is an object: `valid` is yes. Catch errors with a block **Error** outlet or [Try](https://docs.vettero.com/build/workflows/blocks/error/try).

## Use case

- Check a partner webhook posted to an [HTTP Server](https://docs.vettero.com/build/http-servers) before you process the body.
- Confirm an outbound request you signed with [HMAC Create](https://docs.vettero.com/build/workflows/blocks/crypto/hmac-create).

<block-page-nav>



</block-page-nav>


## Sitemap

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