00001 // @(#)root/base:$Id: TBase64.h 28641 2009-05-15 15:20:08Z rdm $ 00002 // Author: Gerardo Ganis + Fons Rademakers 15/5/2009 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2009, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 #ifndef ROOT_TBase64 00013 #define ROOT_TBase64 00014 00015 ////////////////////////////////////////////////////////////////////////// 00016 // // 00017 // TBase64 // 00018 // // 00019 // This code implements the Base64 encoding and decoding. // 00020 // Base64 encoded messages are typically used in authentication // 00021 // protocols and to pack binary data in HTTP messages. // 00022 // // 00023 ////////////////////////////////////////////////////////////////////////// 00024 00025 #ifndef ROOT_Rtypes 00026 #include "Rtypes.h" 00027 #endif 00028 #ifndef ROOT_TString 00029 #include "TString.h" 00030 #endif 00031 00032 00033 class TBase64 { 00034 00035 public: 00036 virtual ~TBase64() { } 00037 00038 static TString Encode(const char *data); 00039 static TString Encode(const char *data, Int_t len); 00040 static TString Decode(const char *data); 00041 00042 ClassDef(TBase64,0) // Base64 encoding/decoding 00043 }; 00044 00045 #endif