---
name: "libkeccak_state_marshal"
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_state_marshal"
---

# libkeccak\_state\_marshal(3)

Marshals a hash state

## NAME

libkeccak\_state\_marshal - Marshals a hash state

## SYNOPSIS

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

Link with *-lkeccak*.

## DESCRIPTION

The **libkeccak\_state\_marshal**() function marshals *\*state* into the beginning of *data*.

Specific *NULL* as *data* to get minimum usable allocation size for

## RETURN VALUES

The **libkeccak\_state\_marshal**() returns the number of bytes written to *data*.

## ERRORS

The **libkeccak\_state\_marshal**() function cannot fail.

## SEE ALSO

[**libkeccak\_state\_unmarshal**(3)](/libkeccak_state_unmarshal/3.md)
