.\" DO NOT MODIFY THIS FILE! It was generated by gdoc. .TH "oath_hex2bin" 3 "2.6.11" "liboath" "liboath" .SH NAME oath_hex2bin \- API function .SH SYNOPSIS .B #include .sp .BI "int oath_hex2bin(const char * " hexstr ", char * " binstr ", size_t * " binlen ");" .SH ARGUMENTS .IP "const char * hexstr" 12 input string with hex data .IP "char * binstr" 12 output string that holds binary data, or NULL .IP "size_t * binlen" 12 output variable holding needed length of \fIbinstr\fP .SH "DESCRIPTION" Convert string with hex data to binary data. Non\-hexadecimal data are not ignored but instead will lead to an \fBOATH_INVALID_HEX\fP error. If \fIbinstr\fP is NULL, then \fIbinlen\fP will be populated with the necessary length. If the \fIbinstr\fP buffer is too small, \fBOATH_TOO_SMALL_BUFFER\fP is returned and \fIbinlen\fP will contain the necessary length. .SH "RETURNS" On success, \fBOATH_OK\fP (zero) is returned, otherwise an error code is returned. .SH "REPORTING BUGS" Report bugs to . liboath home page: https://www.nongnu.org/oath-toolkit/ General help using GNU software: http://www.gnu.org/gethelp/ .SH COPYRIGHT Copyright \(co 2009-2020 Simon Josefsson. .br Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.