summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorpixel <pixel>2007-04-30 16:25:46 +0000
committerpixel <pixel>2007-04-30 16:25:46 +0000
commit739bdeb0fb248ef53da5b2f61b99d804c7dac900 (patch)
treeab6d4f6d6f62e4ae3e00d4caefe0e10cf540f932 /include
parentcdc089b41563a216f9a1a9dfa27ba486d1484990 (diff)
Base64 added into the mess.
Diffstat (limited to 'include')
-rw-r--r--include/Base64.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/Base64.h b/include/Base64.h
new file mode 100644
index 0000000..122f726
--- /dev/null
+++ b/include/Base64.h
@@ -0,0 +1,17 @@
+#ifndef __BASE64_H__
+#define __BASE64_H__
+
+#include <Exceptions.h>
+
+class Base64 : public Base {
+ public:
+ static String encode(char * data, int len);
+ static unsigned char * decode(const String & str_in, int * len_out);
+
+ private:
+ static String encode_block(unsigned char in_tab[3], int len);
+ static int stri(char);
+ static int decode_block(char s1, char s2, char s3, char s4, unsigned char * out_tab);
+};
+
+#endif