blob: 4622b329195414c7508506fad8fbdd8a9270dab0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
//*********************************************************************
//* C_Base64 - a simple base64 encoder and decoder.
//*
//* Copyright (c) 1999, Bob Withers - [email protected]
//*
//* This code may be freely used for any purpose, either personal
//* or commercial, provided the authors copyright notice remains
//* intact.
//*********************************************************************
#ifndef Base64_H
#define Base64_H
#include <string>
using std::string; // comment if your compiler doesn't use namespaces
class Base64
{
public:
static string encode(const string & data);
static string decode(const string & data);
static string encodeFromArray(const char * data, size_t len);
private:
static const string Base64Table;
static const string::size_type DecodeTable[];
};
#endif
|