libkeccak_hmac_set_key(3)

libkeccak_hmac_set_key3

Changes key for a the hmac-hashing state

Usage

#include <libkeccak.h>
int libkeccak_hmac_set_key(struct libkeccak_hmac_state *state, const void *key, size_t key_length);

Link with -lkeccak.

Overview

The libkeccak_hmac_set_key() function sets the key for a HMAC-hashing state without reseting the state of the underlaying hashing-algorithm. key_length is the length of the key in bits.

Return values

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

Errors

The libkeccak_hmac_set_key() function may fail for any specified for the function realloc(3).

From libkeccak 1.4.3-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.