LIBKECCAK_HMAC_COPY(3)

πŸ“¦ version 1.4.3, in arch rolling, opensuse-leap 16.0

πŸ’– NAME πŸ’–

okay bestie, this page is from the LIBKECCAK manual, and the function is libkeccak_hmac_copy β€” it copies an HMAC-hashing state. slay.


πŸ› οΈ SYNOPSIS πŸ› οΈ

#include <libkeccak.h>

int libkeccak_hmac_copy(struct libkeccak_hmac_state *dest, const struct libkeccak_hmac_state *src);

Link with -lkeccak, obviously πŸ’…


✨ DESCRIPTION ✨

so the libkeccak_hmac_copy() function initialises *dest to be identical to *src. and when we say identical, we mean identical β€” this includes all members of the struct libkeccak_hmac_state structure, including the state of the sponge and the message chunk buffer. it's giving full clone energy, no cap 🫢


🫢 RETURN VALUES 🫢

  • on success, libkeccak_hmac_copy() returns 0. periodt ✨
  • on error, it returns -1, and errno is set to describe the error. 😭

😭 ERRORS 😭

the libkeccak_hmac_copy() function may fail for any errors specified for the function malloc(3). that's the error list, bestie β€” keep it in mind πŸ’€


πŸ‘€ SEE ALSO πŸ‘€


πŸ’– cute little sign-off: this is from the LIBKECCAK manual β€” source/version tag LIBKECCAK, and the footer doesn't show a date, so no made-up date from me πŸŽ€ mwah πŸ’‹

πŸ“¦ where this page comes from