---
name: "libkeccak_hmac_fast_update"
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_fast_update"
---

# libkeccak\_hmac\_fast\_update(3)

Partially HMAC-hash a message without erasure

## NAME

libkeccak\_hmac\_fast\_update - Partially HMAC-hash a message without erasure

## SYNOPSIS

```
#include <libkeccak.h>
int libkeccak_hmac_fast_update(struct libkeccak_state *state, const void *msg, size_t msglen);
```

Link with *-lkeccak*.

## DESCRIPTION

The **libkeccak\_hmac\_fast\_update**() function continues (or starts) HMAC-hashing a message. The current state of the hashing is stored in *\*state*, and will be updated. The message specified by the *msg* parameter with the byte-size specified by the *msglen* parameter, will be hashed.

The **libkeccak\_hmac\_fast\_update**() function may reallocate the state's message chunk buffer. When doing so, it attempts to do so as securely as possible, rather than as fast as possible.

## RETURN VALUES

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

## ERRORS

The **libkeccak\_hmac\_fast\_update**() function may reallocate the state's message chunk buffer. When doing so, it attempts to do so as quickly as possible, rather than ensuring that the information in the old allocation is securely removed if a new allocation is required. [**realloc**(3)](/realloc/3.md).

## NOTES

Neither parameter by be *NULL* or 0.

## SEE ALSO

[**libkeccak\_hmac\_create**(3)](/libkeccak_hmac_create/3.md), [**libkeccak\_hmac\_initialise**(3)](/libkeccak_hmac_initialise/3.md), [**libkeccak\_hmac\_fast\_digest**(3)](/libkeccak_hmac_fast_digest/3.md), [**libkeccak\_hmac\_update**(3)](/libkeccak_hmac_update/3.md)
