int oath_base32_encode(const char * in, size_t inlen, char ** out, size_t * outlen);
The in parameter should contain inlen bytes of data to encode. The function allocates a new string in *out to hold the encoded data, and sets *outlen to the length of the data. The output string *out is zero-terminated (ASCII NUL), but the NUL is not counted in *outlen.
If out is NULL, then *outlen will be set to what would have been the length of *out on successful encoding.
If the caller is not interested in knowing the length of the output data out, then outlen may be set to NULL.
It is permitted but useless to have both out and outlen NULL.
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.