base64.h

来自「这里实现了用smtp来发送email」· C头文件 代码 · 共 43 行

H
43
字号
// Base64.h: interface for the CBase64 class.
// Author: Wes Clyburn (clyburnw@enmu.edu)
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_BASE64_H__FD6A25D1_EE0E_11D1_870E_444553540001__INCLUDED_)
#define AFX_BASE64_H__FD6A25D1_EE0E_11D1_870E_444553540001__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#include "MIMECode.h"

class CBase64 : public CMIMECode  
{
public:
	CBase64();
	virtual ~CBase64();
	//编码、解码函数
	virtual int Decode( LPCTSTR szDecoding, LPTSTR szOutput );
	virtual CString Encode( LPCTSTR szEncoding, int nSize );
	
protected:
	//编码
	void write_bits( UINT nBits, int nNumBts, LPTSTR szOutput, int& lp );
	//解码
	UINT read_bits( int nNumBits, int* pBitsRead, int& lp );
	//输入的字符串长度
	int m_nInputSize;
	//剩余的字节数
	int m_nBitsRemaining;
	ULONG m_lBitStorage;
	//输入缓冲区
	LPCTSTR m_szInput;
	//掩码
	static int m_nMask[];
	//转换后的字符表
	static CString m_sBase64Alphabet;
private:
};

#endif // !defined(AFX_BASE64_H__FD6A25D1_EE0E_11D1_870E_444553540001__INCLUDED_)
	

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?