00001
#ifndef CRYPTOPP_BASE32_H
00002
#define CRYPTOPP_BASE32_H
00003
00004
#include "basecode.h"
00005
00006 NAMESPACE_BEGIN(CryptoPP)
00007
00008
00009
00010 class
Base32Encoder : public
SimpleProxyFilter
00011 {
00012
public:
00013
Base32Encoder(
BufferedTransformation *attachment = NULL,
bool uppercase =
true,
int outputGroupSize = 0,
const std::string &separator =
":",
const std::string &terminator =
"")
00014 : SimpleProxyFilter(
new BaseN_Encoder(
new Grouper), attachment)
00015 {
00016 IsolatedInitialize(MakeParameters(Name::Uppercase(), uppercase)(Name::GroupSize(), outputGroupSize)(Name::Separator(),
ConstByteArrayParameter(separator)));
00017 }
00018
00019
void IsolatedInitialize(
const NameValuePairs ¶meters);
00020 };
00021
00022
00023
00024 class Base32Decoder :
public BaseN_Decoder
00025 {
00026
public:
00027
Base32Decoder(
BufferedTransformation *attachment = NULL)
00028 :
BaseN_Decoder(GetDefaultDecodingLookupArray(), 5, attachment) {}
00029
00030
void IsolatedInitialize(
const NameValuePairs ¶meters);
00031
00032
private:
00033
static const int *GetDefaultDecodingLookupArray();
00034 };
00035
00036 NAMESPACE_END
00037
00038
#endif