LIBKECCAK_UNHEX(3) Library Functions Manual LIBKECCAK_UNHEX(3)

libkeccak_unhex - Converts a hexadecimal hashsum to binary

#include <libkeccak.h>
void libkeccak_unhex(void *restrict output, const char *restrict hashsum);

Link with -lkeccak.

The libkeccak_unhex() function converts a hexadecimal hashsum, stored in hashsum, to binary, and stores the binary representation in output.

hashsum must be terminated by a NUL-character. It may be in either lowercase or uppercase, or a mixture thereof. output will not be terminated.

(strlen(hashsum) / 2) bytes will be written to the beginning of Ioutput. It should therefore have an allocation of at least that number of bytes.

The libkeccak_unhex() function does return any value.

The libkeccak_unhex() function cannot fail.

hashsum must have an even number of digits (characters excluding the terminating NUL-character.)

libkeccak_behex_lower(3), libkeccak_behex_upper(3)

LIBKECCAK