Back to index

nordugrid-arc-nox  1.1.0~rc6
Base64.h
Go to the documentation of this file.
00001 // -*- indent-tabs-mode: nil -*-
00002 
00003 /* Base64 encoding and decoding, borrowed from Axis2c project.
00004  * Below is the license which is required by Axis2c.
00005  */
00006 
00007 /*
00008  *   Copyright 2003-2004 The Apache Software Foundation.
00009  *
00010  *   Licensed under the Apache License, Version 2.0 (the "License");
00011  *   you may not use this file except in compliance with the License.
00012  *   You may obtain a copy of the License at
00013  *
00014  *       http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  *   Unless required by applicable law or agreed to in writing, software
00017  *   distributed under the License is distributed on an "AS IS" BASIS,
00018  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00019  *   See the License for the specific language governing permissions and
00020  *   limitations under the License.
00021  */
00022 
00023 #ifndef ARCLIB_BASE64
00024 #define ARCLIB_BASE64
00025 
00026 #include <string>
00027 
00028 namespace Arc {
00029   class Base64 {
00030   public:
00031     Base64();
00032     ~Base64();
00033     static int encode_len(int len);
00034     static int encode(char *encoded, const char *string, int len);
00035     static int decode_len(const char *bufcoded);
00036     static int decode(char *bufplain, const char *bufcoded);
00037   };
00038 } // namespace Arc
00039 
00040 #endif // ARCLIB_BASE64