libkeccak_state_copy(3)

libkeccak_state_copy3

Copies hash state

Usage

#include <libkeccak.h>
int libkeccak_state_copy(struct libkeccak_state *dest, const struct libkeccak_state *src);

Link with -lkeccak.

Overview

The libkeccak_state_copy() function initialises *dest to be identical to *src. This includes all members of the struct libkeccak_state structure, including the state of the sponge and the message chunk buffer.

Return values

The libkeccak_state_copy() function returns 0 upon successful completion. On error, -1 is returned and errno is set to describe the error.

Errors

The libkeccak_state_copy() function may fail for any specified for the function malloc(3).

From libkeccak 1.4.3-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.