Base64.h++
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __ccxx_Base64_hxx
00024 #define __ccxx_Base64_hxx
00025
00026 #include <commonc++/Common.h++>
00027 #include <commonc++/Buffer.h++>
00028
00029 namespace ccxx {
00030
00036 class COMMONCPP_API Base64
00037 {
00038 public:
00039
00050 static size_t encode(ByteBuffer& input, CharBuffer& output) throw();
00051
00064 static size_t encode(const byte_t *input, size_t inputLen,
00065 char *output, size_t outputLen) throw();
00066
00078 static size_t decode(CharBuffer& input, ByteBuffer& output) throw();
00079
00093 static size_t decode(const char *input, size_t inputLen,
00094 byte_t *output, size_t outputLen) throw();
00095
00096 private:
00097
00098 static int32_t decodeByte(char c);
00099 static char encodeByte(int32_t b);
00100
00101 Base64();
00102 CCXX_COPY_DECLS(Base64);
00103 };
00104
00105 };
00106
00107 #endif // __ccxx_Base64_hxx
00108
00109