LIBKECCAK_STATE_DUPLICATE(3)
πΈ NAME πΈ
Okay bestie, this is the LIBKECCAK_STATE_DUPLICATE(3) page from the Library Functions Manual, and it is literally about one thing: allocating a duplicate hash state. Slay. π
π¦ SYNOPSIS π¦
#include <libkeccak.h>
struct libkeccak_state *libkeccak_state_duplicate(const struct libkeccak_state *src);
Link with -lkeccakP.
β¨ DESCRIPTION β¨
So libkeccak_state_duplicate() allocates a new hash state and initialises it to be identical to *src. Not similar, not "close enough" β identical identical, bestie π«Ά.
That means all members of the struct libkeccak_state structure get duplicated, including the state of the sponge and the message chunk buffer. The way it copies the whole struct is highkey main character energy π.
π RETURN VALUES π
On successful completion, libkeccak_state_duplicate() returns a newly allocated struct libkeccak_state* (of one initialised element). Iconic, no notes. β¨
On error, NULL is returned and errno is set to describe the error. Sad girl hours, but at least it tells you why π.
π ERRORS π
The libkeccak_state_duplicate() function may fail for any reason specified for the function malloc(3). So like, malloc stuff can happen β that's the whole mood. π«‘
π₯ SEE ALSO π₯
Byeee from the LIBKECCAK manual β source/version LIBKECCAK, plus the footer date as printed, mwah ππβ¨
π¦ where this page comes from
- arch rolling: libkeccak 1.4.3-1 Β· custom:ISC
- opensuse-leap 16.0: libkeccak-devel 1.4-bp160.1.13 Β· ISC
- opensuse-leap 16.0: libkeccak-devel 1.4-bp160.1.13 Β· ISC
- opensuse-leap 16.0: libkeccak-devel 1.4-bp160.1.13 Β· ISC
- opensuse-leap 16.0: libkeccak-devel 1.4-bp160.1.13 Β· ISC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms