base64.h
#ifndef CRYPTOPP_BASE64_H
#define CRYPTOPP_BASE64_H
#include "basecode.h"
NAMESPACE_BEGIN(CryptoPP)
//! Base64 Encoder Class
class Base64Encoder : public SimpleProxyFilter
{
public:
Base64Encoder(BufferedTransformation *attachment = NULL, bool insertLineBreaks = true, int maxLineLength = 72)
: SimpleProxyFilter(new BaseN_Encoder(new Grouper), attachment)
{
IsolatedInitialize(MakeParameters(Name::InsertLineBreaks(), insertLineBreaks)(Name::MaxLineLength(), maxLineLength));
}
void IsolatedInitialize(const NameValuePairs &parameters);
};
//! Base64 Decoder Class
class Base64Decoder : public BaseN_Decoder
{
public:
Base64Decoder(BufferedTransformation *attachment = NULL)
: BaseN_Decoder(GetDecodingLookupArray(), 6, attachment) {}
void IsolatedInitialize(const NameValuePairs &parameters) {}
private:
static const int * CRYPTOPP_API GetDecodingLookupArray();
};
NAMESPACE_END
#endif
Base64Decoder
Base64 Decoder Class.
Definition: base64.h:22
BufferedTransformation
interface for buffered transformations
Definition: cryptlib.h:770
Base64Encoder
Base64 Encoder Class.
Definition: base64.h:9
SimpleProxyFilter
simple proxy filter that doesn't modify the underlying filter's input or output
Definition: filters.h:555
Grouper
filter that breaks input stream into groups of fixed size
Definition: basecode.h:62
BaseN_Encoder
base n encoder, where n is a power of 2
Definition: basecode.h:11
BaseN_Decoder
base n decoder, where n is a power of 2
Definition: basecode.h:37
NameValuePairs
interface for retrieving values given their names
Definition: cryptlib.h:224