ESAPI-C 1.0
The OWASP Enterprise Security API for C

base64.h File Reference

Base64 Encoding module header Encodes binary data using printable characters. More...

#include <stddef.h>
#include <stdbool.h>

Go to the source code of this file.

Defines

#define BASE64_LENGTH(inlen)   ((((inlen) + 2) / 3) * 4)
 Calculates the length of the Base64 encoded value for the given data size (in characters).

Functions

bool isbase64 (char ch)
 Determines if the given character is within the Base64 encoding character set.
void base64_encode (const char *, size_t, char *, size_t)
 Base64 encodes the given input character array to the given output buffer.
size_t base64_encode_alloc (const char *, size_t, char **)
bool base64_decode (const char *, size_t, char *, size_t *)
 Base64 decodes the given input character array to the given output buffer.
bool base64_decode_alloc (const char *, size_t, char **, size_t *)

Detailed Description

Base64 Encoding module header Encodes binary data using printable characters.

Since:
January 30, 2011

Definition in file base64.h.


Define Documentation

#define BASE64_LENGTH (   inlen)    ((((inlen) + 2) / 3) * 4)

Calculates the length of the Base64 encoded value for the given data size (in characters).

This uses that the expression (n+(k-1))/k means the smallest integer >= n/k, i.e., the ceiling of n/k.

Definition at line 43 of file base64.h.

 All Data Structures Files Functions Variables Typedefs Defines