.\" DO NOT MODIFY THIS FILE! It was generated by gdoc. .TH "oath_base32_encode" 3 "2.6.11" "liboath" "liboath" .SH NAME oath_base32_encode \- API function .SH SYNOPSIS .B #include .sp .BI "int oath_base32_encode(const char * " in ", size_t " inlen ", char ** " out ", size_t * " outlen ");" .SH ARGUMENTS .IP "const char * in" 12 input string with binary data of length \fIinlen\fP .IP "size_t inlen" 12 length of input data \fIin\fP .IP "char ** out" 12 pointer to newly allocated output string of length \fIoutlen\fP, or NULL .IP "size_t * outlen" 12 pointer to output variable holding length of \fIout\fP, or NULL .SH "DESCRIPTION" Encode binary data into a string with base32 data. The \fIin\fP parameter should contain \fIinlen\fP bytes of data to encode. The function allocates a new string in *\fIout\fP to hold the encoded data, and sets *\fIoutlen\fP to the length of the data. The output string *\fIout\fP is zero\-terminated (ASCII NUL), but the NUL is not counted in *\fIoutlen\fP. 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_BASE32_OVERFLOW\fP is returned if the output would be too large to store, 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.