.\" DO NOT MODIFY THIS FILE! It was generated by gdoc. .TH "oath_base32_decode" 3 "2.6.12" "liboath" "liboath" .SH NAME oath_base32_decode \- API function .SH SYNOPSIS .B #include .sp .BI "int oath_base32_decode(const char * " in ", size_t " inlen ", char ** " out ", size_t * " outlen ");" .SH ARGUMENTS .IP "const char * in" 12 input string with base32 encoded data of length \fIinlen\fP .IP "size_t inlen" 12 length of input base32 string \fIin\fP .IP "char ** out" 12 pointer to output variable for binary data of length \fIoutlen\fP, or NULL .IP "size_t * outlen" 12 pointer to output variable holding length of \fIout\fP, or NULL .SH "DESCRIPTION" Decode a base32 encoded string into binary data. Space characters are ignored and pad characters are added if needed. Non\-base32 data are not ignored but instead will lead to an \fBOATH_INVALID_BASE32\fP error. The \fIin\fP parameter should contain \fIinlen\fP bytes of base32 encoded data. The function allocates a new string in *\fIout\fP to hold the decoded data, and sets *\fIoutlen\fP to the length of the data. If \fIout\fP is NULL, then *\fIoutlen\fP will be set to what would have been the length of *\fIout\fP on successful encoding. If the caller is not interested in knowing the length of the output data \fIout\fP, then \fIoutlen\fP may be set to NULL. It is permitted but useless to have both \fIout\fP and \fIoutlen\fP NULL. .SH "RETURNS" On success \fBOATH_OK\fP (zero) is returned, \fBOATH_INVALID_BASE32\fP is returned if the input contains non\-base32 characters, and \fBOATH_MALLOC_ERROR\fP is returned on memory allocation errors. .SH "SINCE" 1.12.0 .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.