1oath_hex2bin(3)                     liboath                    oath_hex2bin(3)
2
3
4

NAME

6       oath_hex2bin - API function
7

SYNOPSIS

9       #include <oath.h>
10
11       int oath_hex2bin(const char * hexstr, char * binstr, size_t * binlen);
12

ARGUMENTS

14       const char * hexstr
15                   input string with hex data
16
17       char * binstr
18                   output string that holds binary data, or NULL
19
20       size_t * binlen
21                   output variable holding needed length of binstr
22

DESCRIPTION

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

RETURNS

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

REPORTING BUGS

38       Report  bugs  to  <oath-toolkit-help@nongnu.org>.   liboath  home page:
39       http://www.gnu.org/software/liboath/ General help using  GNU  software:
40       http://www.gnu.org/gethelp/
41
43       Copyright © 2009-2016 Simon Josefsson.
44       Copying  and  distribution  of this file, with or without modification,
45       are permitted in any medium  without  royalty  provided  the  copyright
46       notice and this notice are preserved.
47
48
49
50liboath                              2.6.2                     oath_hex2bin(3)
Impressum