Vuo  1.2.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
VuoBase64.cc File Reference

Description

VuoBase64 implementation, based on the work of René Nyffenegger.

Copyright (C) 2004-2008 René Nyffenegger

This source code is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this source code must not be misrepresented; you must not claim that you wrote the original source code. If you use this source code in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  1. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original source code.
  1. This notice may not be removed or altered from any source distribution.

René Nyffenegger rene..nosp@m.nyff.nosp@m.enegg.nosp@m.er@a.nosp@m.dp-gm.nosp@m.bh.c.nosp@m.h

Functions

static bool is_base64 (unsigned char c)
 Returns true if the character is one of the 64 characters part of the Base64 encoding set.
 
char * VuoBase64_encode (long long in_len, char const *bytes_to_encode)
 Converts data (raw 8-bit binary data) into ASCII Base64 text with a null-terminator.
 
char * VuoBase64_decode (char const *encoded_string, long long *outputLength)
 Converts text (ASCII Base64 text) into raw 8-bit binary data, and outputs the number of decoded bytes in outputLength.
 

Variables

static const std::string base64_chars
 The 64 characters part of the Base64 encoding set.
 

Function Documentation

static bool is_base64 ( unsigned char  c)
inlinestatic

Returns true if the character is one of the 64 characters part of the Base64 encoding set.

char* VuoBase64_decode ( char const *  encoded_string,
long long *  outputLength 
)

Converts text (ASCII Base64 text) into raw 8-bit binary data, and outputs the number of decoded bytes in outputLength.

The caller is responsible for freeing the returned string.

char* VuoBase64_encode ( long long  in_len,
char const *  bytes_to_encode 
)

Converts data (raw 8-bit binary data) into ASCII Base64 text with a null-terminator.

The caller is responsible for freeing the returned string.

Variable Documentation

const std::string base64_chars
static
Initial value:
=
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"
"0123456789+/"

The 64 characters part of the Base64 encoding set.