libkeccak_hmac_create3
Allocate and initialise hmac-hashing state
Usage
#include <libkeccak.h> struct libkeccak_hmac_state *libkeccak_hmac_create(const struct libkeccak_spec *spec, const void *key, size_t key_length);
Link with -lkeccak.
Overview
The libkeccak_hmac_create() function allocates a new struct libkeccak_hmac_state * with one initialised element, and sets the algorithm tuning parameters to those specified by *spec, and the key to key of length key_length.
Return values
The libkeccak_hmac_create() function returns a newly allocated struct libkeccak_hmac_state * (of one initialised element) upon successful completion. On error, NULL is returned and errno is set to describe the error.
Errors
The libkeccak_hmac_create() function may fail for any specified for the functions malloc(3) and realloc(3).