---
name: "libkeccak_hmac_unmarshal"
section: "3"
platform: "linux"
package: "libkeccak"
version: "1.4.3-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libkeccak_hmac_unmarshal"
---

# libkeccak\_hmac\_unmarshal(3)

Unharshals an HMAC-hashing state

## NAME

libkeccak\_hmac\_unmarshal - Unharshals an HMAC-hashing state

## SYNOPSIS

```
#include <libkeccak.h>
size_t libkeccak_hmac_unmarshal(struct libkeccak_hmac_state *state, const void *data);
```

Link with *-lkeccak*.

## DESCRIPTION

The **libkeccak\_hmac\_unmarshal**() function unmarshals an HMAC-hashing state from the beginning of *data*. and stores it in *\*state*. *state* may be *NULL*.

## RETURN VALUES

The **libkeccak\_hmac\_unmarshal**() returns the number of bytes reads from *data* upon successful completion. On error, -1 is returned and *errno* is set to describe the error. If *state* is *NULL*, the number the function will always be successful and return a positive value, this value is the number of bytes that make un the marshalled state.

## ERRORS

The **libkeccak\_hmac\_unmarshal**() function may fail for any specified for the function [**malloc**(3)](/malloc/3.md).

## SEE ALSO

[**libkeccak\_hmac\_marshal**(3)](/libkeccak_hmac_marshal/3.md)
