---
name: "libkeccak_hmac_reset"
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_reset"
---

# libkeccak\_hmac\_reset(3)

Reinitialise a HMAC-hashing state

## NAME

libkeccak\_hmac\_reset - Reinitialise a HMAC-hashing state

## SYNOPSIS

```
#include <libkeccak.h>
int libkeccak_hmac_reset(struct libkeccak_hmac_state *state, const void *key, size_t key_length);
```

Link with *-lkeccak*.

## DESCRIPTION

The **libkeccak\_hmac\_reset**() function reinitialises an HMAC-hashing state with a new key. *key\_length* is the length of the key in bits. If *key* is *NULL*, the key remains unchanged.

## RETURN VALUES

The **libkeccak\_hmac\_reset**() function returns 0 successful completion. On error -1 is returned and *errno* is set to describe the error.

## ERRORS

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

## SEE ALSO

[**libkeccak\_hmac\_create**(3)](/libkeccak_hmac_create/3.md), [**libkeccak\_hmac\_initialise**(3)](/libkeccak_hmac_initialise/3.md), [**libkeccak\_hmac\_set\_key**(3)](/libkeccak_hmac_set_key/3.md), [**libkeccak\_hmac\_wipe**(3)](/libkeccak_hmac_wipe/3.md), [**libkeccak\_hmac\_fast\_free**(3)](/libkeccak_hmac_fast_free/3.md), [**libkeccak\_hmac\_free**(3)](/libkeccak_hmac_free/3.md), [**libkeccak\_hmac\_fast\_destroy**(3)](/libkeccak_hmac_fast_destroy/3.md), [**libkeccak\_hmac\_destroy**(3)](/libkeccak_hmac_destroy/3.md)
