base64.c File Reference

Base64 encoding/decoding (RFC1341). More...

#include "includes.h"
#include "os.h"
#include "base64.h"
Include dependency graph for base64.c:

Go to the source code of this file.

Functions

unsigned char * base64_encode (const unsigned char *src, size_t len, size_t *out_len)
 Base64 encode.
unsigned char * base64_decode (const unsigned char *src, size_t len, size_t *out_len)
 Base64 decode.

Detailed Description

Base64 encoding/decoding (RFC1341).

Copyright
Copyright (c) 2005, Jouni Malinen <j@w1.fi>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

Alternatively, this software may be distributed under the terms of BSD license.

See README and COPYING for more details.

Definition in file base64.c.


Function Documentation

unsigned char* base64_decode ( const unsigned char *  src,
size_t  len,
size_t *  out_len 
)

Base64 decode.

Parameters:
src Data to be decoded
len Length of the data to be decoded
out_len Pointer to output length variable
Returns:
Allocated buffer of out_len bytes of decoded data, or NULL on failure

Caller is responsible for freeing the returned buffer.

Definition at line 106 of file base64.c.

unsigned char* base64_encode ( const unsigned char *  src,
size_t  len,
size_t *  out_len 
)

Base64 encode.

Parameters:
src Data to be encoded
len Length of the data to be encoded
out_len Pointer to output length variable, or NULL if not used
Returns:
Allocated buffer of out_len bytes of encoded data, or NULL on failure

Caller is responsible for freeing the returned buffer. Returned buffer is nul terminated to make it easier to use as a C string. The nul terminator is not included in out_len.

Definition at line 37 of file base64.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Sat Nov 21 23:23:27 2009 for hostapd by  doxygen 1.6.1