CppCMS
|
00001 00002 // 00003 // Copyright (C) 2008-2012 Artyom Beilis (Tonkikh) <artyomtnk@yahoo.com> 00004 // 00005 // See accompanying file COPYING.TXT file for licensing details. 00006 // 00008 #ifndef CPPCMS_BASE64_H 00009 #define CPPCMS_BASE64_H 00010 00011 #include <cppcms/defs.h> 00012 #include <string> 00013 #include <iosfwd> 00014 00015 00016 namespace cppcms { 00022 namespace b64url { 00023 00027 int CPPCMS_API encoded_size(size_t s); 00033 int CPPCMS_API decoded_size(size_t s); 00034 00041 unsigned char CPPCMS_API *encode(unsigned char const *begin,unsigned char const *end,unsigned char *target); 00045 void encode(unsigned char const *begin,unsigned char const *end,std::ostream &output); 00046 00055 unsigned char CPPCMS_API *decode(unsigned char const *begin,unsigned char const *end,unsigned char *target); 00056 00063 bool CPPCMS_API decode(std::string const &input,std::string &output); 00068 std::string CPPCMS_API encode(std::string const &input); 00069 } 00070 } 00071 00072 00073 #endif