LIBKECCAK_STATE_COPY(3)
okay so bestie, we're in LIBKECCAK_STATE_COPY(3) from the Library Functions Manual, and this is the tiny but iconic copy function that deserves main character energy β¨π
β¨ NAME β¨
libkeccak_state_copyβ copies hash state, and yes that's the whole vibe π«Ά
π¦ SYNOPSIS π¦
#include <libkeccak.h>
int libkeccak_state_copy(struct libkeccak_state *dest, const struct libkeccak_state *src);
Link with -lkeccak.
πΈ DESCRIPTION πΈ
So libkeccak_state_copy() initialises *dest to be identical to *src β like, a full copy-paste glow-up, no cap π
This includes all members of the struct libkeccak_state structure, including the state of the sponge and the message chunk buffer. Every little detail gets copied, bestie β the whole struct is giving matched-set energy π
π RETURN VALUES π
- It returns
0upon successful completion β slay, we love a clean exit β¨ - On error,
-1is returned anderrnois set to describe the error π
π ERRORS π
The libkeccak_state_copy() function may fail for any specified for the function malloc(3). Yep, it's got the same failure energy as malloc(3) β no extra lore, just that π
π₯ SEE ALSO π₯
mwah π β sourced from LIBKECCAK, page LIBKECCAK_STATE_COPY(3); the footer didn't print a date, so we're not inventing one, bestie π«Άπ
π¦ 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