base64.c File Reference

#include "internal.h"
#include "base64.h"

Go to the source code of this file.

Functions

int gsasl_base64_to (const char *in, size_t inlen, char **out, size_t *outlen)
int gsasl_base64_from (const char *in, size_t inlen, char **out, size_t *outlen)


Function Documentation

int gsasl_base64_from ( const char *  in,
size_t  inlen,
char **  out,
size_t *  outlen 
)

gsasl_base64_from:

Parameters:
in input byte array
inlen size of input byte array
out pointer to newly allocated output byte array
outlen pointer to size of newly allocated output byte array
Decode Base64 data. The OUT buffer must be deallocated by the caller.

Return value: Returns GSASL_OK on success, GSASL_BASE64_ERROR if input was invalid, and GSASL_MALLOC_ERROR on memory allocation errors.

Since: 0.2.2

Definition at line 74 of file base64.c.

References GSASL_BASE64_ERROR, GSASL_MALLOC_ERROR, and GSASL_OK.

Referenced by gsasl_step64().

int gsasl_base64_to ( const char *  in,
size_t  inlen,
char **  out,
size_t *  outlen 
)

gsasl_base64_to:

Parameters:
in input byte array
inlen size of input byte array
out pointer to newly allocated output byte array
outlen pointer to size of newly allocated output byte array
Encode data as base64. The string is zero terminated, and OUTLEN holds the length excluding the terminating zero. The OUT buffer must be deallocated by the caller.

Return value: Returns GSASL_OK on success, or GSASL_MALLOC_ERROR if input was too large or memory allocation fail.

Since: 0.2.2

Definition at line 44 of file base64.c.

References GSASL_MALLOC_ERROR, and GSASL_OK.

Referenced by _gsasl_digest_md5_client_start(), _gsasl_digest_md5_server_start(), and gsasl_step64().


Generated on Tue Aug 22 12:06:07 2006 for gsasl by  doxygen 1.4.7