LIBKECCAK_STATE_CREATE(3) Library Functions Manual LIBKECCAK_STATE_CREATE(3)

libkeccak_state_create - Allocate and initialise hash state

#include <libkeccak.h>
struct libkeccak_state *libkeccak_state_create(const struct libkeccak_spec *spec);

Link with -lkeccak.

The libkeccak_state_create() function allocates a new struct libkeccak_state * with one initialised element, and sets the algorithm tuning parameters to those specified by *spec.

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

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

libkeccak_state_initialise(3), libkeccak_state_free(3), libkeccak_state_fast_free(3) libkeccak_state_duplicate(3)

LIBKECCAK