2009-10-01 05:08:33 +02:00
|
|
|
// util/base64.h
|
|
|
|
|
2009-10-27 20:58:27 +01:00
|
|
|
/* Copyright 2009 10gen Inc.
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2009-10-01 05:08:33 +02:00
|
|
|
|
|
|
|
namespace mongo {
|
|
|
|
namespace base64 {
|
2009-10-01 05:32:28 +02:00
|
|
|
|
2009-10-01 07:26:19 +02:00
|
|
|
void encode( stringstream& ss , const char * data , int size );
|
2009-10-01 05:08:33 +02:00
|
|
|
string encode( const char * data , int size );
|
2009-10-01 05:32:28 +02:00
|
|
|
string encode( const string& s );
|
|
|
|
|
|
|
|
void decode( stringstream& ss , const string& s );
|
|
|
|
string decode( const string& s );
|
|
|
|
|
|
|
|
|
2009-10-01 05:08:33 +02:00
|
|
|
void testAlphabet();
|
|
|
|
}
|
|
|
|
}
|