logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

oath_hex2bin - API function

Arguments

const char * hexstr input string with hex data char * binstr output string that holds binary data, or NULL size_t * binlen output variable holding needed length of binstr

Description

Convert string with hex data to binary data. Non-hexadecimal data are not ignored but instead will lead to an OATH_INVALID_HEX error. If binstr is NULL, then binlen will be populated with the necessary length. If the binstr buffer is too small, OATH_TOO_SMALL_BUFFER is returned and binlen will contain the necessary length.

Name

oath_hex2bin - API function

Reporting Bugs

Report bugs to <oath-toolkit-help@nongnu.org>. liboath home page: https://www.nongnu.org/oath-toolkit/ General help using GNU software: http://www.gnu.org/gethelp/

Returns

On success, OATH_OK (zero) is returned, otherwise an error code is returned.

Synopsis

#include<oath.h>intoath_hex2bin(constchar*hexstr,char*binstr,size_t*binlen);

See Also