Scroll to navigation

LIBKECCAK_HMAC_CREATE(3) Library Functions Manual LIBKECCAK_HMAC_CREATE(3)

NAME

libkeccak_hmac_create - Allocate and initialise HMAC-hashing state

SYNOPSIS

#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.

DESCRIPTION

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).

SEE ALSO

libkeccak_hmac_initialise(3), libkeccak_hmac_free(3), libkeccak_hmac_fast_free(3), libkeccak_hmac_duplicate(3)

LIBKECCAK