#ifndef BASE32_H
#define BASE32_H
/* Translates binary data into base32 (RFC 4648, Section 6). The src must not
point to dest buffer. The pad argument determines whether output is padded
with '='.
*/
/* Translates binary data into base32hex (RFC 4648, Section 7). The src must
not point to dest buffer. The pad argument determines whether output is
padded with '='.
*/
dest may point to same buffer as src. Returns 1 if all ok, 0 if end of
base32 data found, -1 if data is invalid.
Any whitespace characters are ignored.
This function may be called multiple times for parsing the same stream.
If src_pos is non-NULL, it's updated to first non-translated character in
src. */
/* Decode given string to a buffer allocated from data stack. */
/* Returns TRUE if c is a valid base32 encoding character (excluding '=') */
bool base32_is_valid_char(char c);
bool base32hex_is_valid_char(char c);
/* max. buffer size required for base32_encode()/base32hex_encode() */
/* max. buffer size required for base32_decode()/base32hex_decode() */
#endif