LIBKECCAK_UNHEX(3)
π NAME π
Okay so bestie, welcome to LIBKECCAK_UNHEX(3), from the Library Functions Manual β yes, the manual name is literally right there, cute. β¨ The main character is libkeccak_unhex, and her whole thing is this: converts a hexadecimal hashsum to binary. No cap. π
π SYNOPSIS π
#include <libkeccak.h>
void libkeccak_unhex(void *restrict output, const char *restrict hashsum);
Link with -lkeccak. π«Ά
π¦ DESCRIPTION π¦
So libkeccak_unhex() takes the hexadecimal hashsum that's chilling in hashsum, converts it to binary, and drops the binary representation into output. Iconic behavior, honestly. π
hashsum has to be terminated by a NUL-character. It can be lowercase, uppercase, or a mix of both β she's flexible like that. π
π¨outputwill not be terminated. Important, bestie. Do not expect a cute lil'NULat the end. π
(strlen(hashsum) / 2) bytes will be written to the beginning of Ioutput β yep, the page literally says Ioutput, so that's the output pointer having a tiny typo moment π. Because of that, output should have an allocation of at least that number of bytes. Don't skimp on the buffer, fr fr. π
π RETURN VALUES π
libkeccak_unhex() does return any value. That's what the page says β and the synopsis is all void, so it's giving βno value returnedβ energy. The original wording is a little quirky, but we're keeping it. π
π₯ ERRORS π₯
libkeccak_unhex() cannot fail. Periodt. π
β¨
π NOTES π
hashsum must have an even number of digits β and that's characters excluding the terminating NUL-character, bestie. Even digits only. No odd-numbered chaos allowed. πΈ
π«Ά SEE ALSO π«Ά
Cute little footer sign-off: source/version LIBKECCAK, page LIBKECCAK_UNHEX(3) β and there's no date in the footer, so no invented date, just vibes. πππ¦
π¦ 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