LIBKECCAK_HMAC_DUPLICATE(3) Library Functions Manual LIBKECCAK_HMAC_DUPLICATE(3)

libkeccak_hmac_duplicate - Allocate a duplicate an HMAC-hashing state

#include <libkeccak.h>
struct libkeccak_hmac_state *libkeccak_hmac_duplicate(const struct libkeccak_hmac_state *src);

Link with -lkeccak.

The libkeccak_hmac_duplicate() function allocates a new hash state and initialises it to be identical to *src. This includes all members of the struct libkeccak_hmac_state structure, including the state of the sponge and the message chunk buffer.

The libkeccak_hmac_duplicate() function returns a newly allocated libkeccak_hmac_t* (of one initialised element) upon successful completion. On error, NULL is returned and errno is set to describe the error.

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

libkeccak_hmac_copy(3), libkeccak_hmac_create(3)

LIBKECCAK