/*
*/
/*
* saslutil.h -- various utility functions in SASL library
*/
#ifndef _SASL_SASLUTIL_H
#define _SASL_SASLUTIL_H
#ifndef _SASL_SASL_H
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* base64 decode
* in -- input data
* inlen -- length of input data
* out -- output data (may be same as in, must have enough space)
* outmax -- max size of output buffer
* result:
* outlen -- actual output length
*
* returns SASL_BADPROT on bad base64,
* SASL_BUFOVER if result won't fit
* SASL_OK on success
*/
/*
* base64 encode
* in -- input data
* inlen -- input data length
* out -- output buffer (will be NUL terminated)
* outmax -- max size of output buffer
* result:
* outlen -- gets actual length of output buffer (optional)
*
* Returns SASL_OK on success, SASL_BUFOVER if result won't fit
*/
#if 0
/*
* The following is not supported:
*
* make a challenge string (NUL terminated)
* buf -- buffer for result
* maxlen -- max length of result
* hostflag -- 0 = don't include hostname, 1 = include hostname
* returns final length or 0 if not enough space
*/
#endif
/*
* verify a string is valid UTF-8
* if len == 0, strlen(str) will be used.
* returns SASL_BADPROT on error, SASL_OK on success
*/
#if 0
/* The following are not supported */
/* create random pool seeded with OS-based params */
/* free random pool from randcreate */
/* seed random number generator */
unsigned len);
/* generate random octets */
/* churn data into random number generator */
unsigned len);
#endif
/*
* erase a security sensitive buffer or password.
* Implementation may use recovery-resistant erase logic.
*/
#ifdef __cplusplus
}
#endif
#endif /* _SASL_SASLUTIL_H */