Scroll to navigation

LIBKECCAK_SPEC_SHA3(3) Library Functions Manual LIBKECCAK_SPEC_SHA3(3)

NAME

libkeccak_spec_sha3 - Configure SHA-3 hashing parameters

SYNOPSIS

#include <libkeccak.h>
void libkeccak_spec_sha3(struct libkeccak_spec *spec, long int x);

Link with -lkeccak.

DESCRIPTION

The libkeccak_spec_sha3() function sets *spec to specify the Keccak parameters used for SHA-3 hashing with the output size specified, in bits, via the x parameter.

RETURN VALUES

The libkeccak_spec_sha3() function does not return any value.

ERRORS

The libkeccak_spec_sha3() function cannot fail.

EXAMPLE

This example configure a struct libkeccak_spec to specify the Keccak parameters used for SHA3-256:

struct libkeccak_spec spec;
libkeccak_spec_sha3(&spec, 256);

SEE ALSO

libkeccak_spec_cshake(3), libkeccak_spec_rawshake(3), libkeccak_spec_shake(3), libkeccak_spec_check(3), libkeccak_generalised_spec_initialise(3), libkeccak_state_initialise(3), libkeccak_hmac_initialise(3)

LIBKECCAK