libkeccak_spec_cshake(3)

libkeccak_spec_cshake3

Configure cshake hashing parameters

Usage

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

Link with -lkeccak.

Overview

The libkeccak_spec_cshake() function sets *spec to specify the Keccak parameters used for cSHAKE hashing with the semicapacity specified, in bits, via the x parameter, and the output size specified, in bits, via the d parameter.

Return values

The libkeccak_spec_cshake() function does not return any value.

Errors

The libkeccak_spec_cshake() function cannot fail.

Examples

This example configure a struct libkeccak_spec to specify the Keccak parameters used for cSHAKE256(, 512):

struct libkeccak_spec spec;
libkeccak_spec_cshake(&spec, 256, 512);

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