LIBKECCAK_STATE_COPY(3) Library Functions Manual LIBKECCAK_STATE_COPY(3)

libkeccak_state_copy - Copies hash state

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

Link with -lkeccak.

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.

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

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

libkeccak_state_duplicate(3), libkeccak_state_initialise(3)

LIBKECCAK