/[debian]/mimetic/branches/upstream/current/mimetic/codec/base64.cxx
ViewVC logotype

Contents of /mimetic/branches/upstream/current/mimetic/codec/base64.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 128 - (show annotations)
Sat Feb 25 16:49:20 2006 UTC (15 years, 5 months ago) by gregoa
File size: 1731 byte(s)
[svn-inject] Installing original source of mimetic
1 /***************************************************************************
2 copyright : (C) 2002-2005 by Stefano Barbato
3 email : stefano@codesink.org
4
5 $Id: base64.cxx,v 1.2 2005/02/23 10:26:14 tat Exp $
6 ***************************************************************************/
7
8 /***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16 #include <mimetic/codec/base64.h>
17
18 using namespace mimetic;
19
20 const char Base64::sEncTable[] =
21 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
22 "abcdefghijklmnopqrstuvwxyz"
23 "0123456789+/=";
24
25 const char Base64::sDecTable[] = {
26 -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
27 -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
28 -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
29 -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
30 -1,-1,-1,62,-1,-1,-1,63,52,53,
31 54,55,56,57,58,59,60,61,-1,-1,
32 -1, eq_sign, -1,-1,-1, 0, 1, 2, 3, 4,
33 5, 6, 7, 8, 9,10,11,12,13,14,
34 15,16,17,18,19,20,21,22,23,24,
35 25,-1,-1,-1,-1,-1,-1,26,27,28,
36 29,30,31,32,33,34,35,36,37,38,
37 39,40,41,42,43,44,45,46,47,48,
38 49,50,51,-1
39 };
40
41 const int Base64::sDecTableSz = sizeof(Base64::sDecTable) / sizeof(char);
42

  ViewVC Help
Powered by ViewVC 1.1.26