?? base64.h
字號(hào):
#ifndef CRYPTOPP_BASE64_H
#define CRYPTOPP_BASE64_H
#include "cryptlib.h"
#include "filters.h"
NAMESPACE_BEGIN(CryptoPP)
class Base64Encoder : public Filter
{
public:
Base64Encoder(BufferedTransformation *outQueue = NULL, bool insertLineBreak = true);
void Put(byte inByte)
{
inBuf[inBufSize++]=inByte;
if (inBufSize==3)
EncodeQuantum();
}
void Put(const byte *inString, unsigned int length);
void InputFinished();
private:
void LineBreak();
void EncodeQuantum();
const bool insertLineBreak;
int inBufSize;
int lineLength;
byte inBuf[3];
};
class Base64Decoder : public Filter
{
public:
Base64Decoder(BufferedTransformation *outQueue = NULL);
void Put(byte inByte)
{
int i=ConvToNumber(inByte);
if (i >= 0)
inBuf[inBufSize++]=(byte) i;
if (inBufSize==4)
DecodeQuantum();
}
void Put(const byte *inString, unsigned int length);
void InputFinished();
private:
static int ConvToNumber(byte inByte);
void DecodeQuantum();
int inBufSize;
byte inBuf[4];
};
NAMESPACE_END
#endif
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -