文档介绍:踏雪无痕
VC下Base64编码及解码程序源代码
分类: C++ 2012-02-02 16:26 460人阅读评论(2) 收藏举报
// : interface for the CBase64 class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_BASE64_H__8D85F486_CD10_4A0A_A689_2299C9DE52CB__INCLUDED_)
#define AFX_BASE64_H__8D85F486_CD10_4A0A_A689_2299C9DE52CB__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define DllImport __declspec( dllimport )
#define DllExport __declspec( dllexport )
class DllExport CBase64
{
public:
CBase64();
virtual ~CBase64();
public:
int DecodeBase64(const char* pSrc, unsigned char* pDst, int nSrcLen);
int EncodeBase64(const unsigned char* pSrc, char* pDst, int nSrcLen, int nMaxLineLen);
};
#endif // !defined(AFX_BASE64_H__8D85F486_CD10_4A0A_A689_2299C9DE52CB__INCLUDED_)
// : implementation of the CBase64 class.
//
//////////////////////////////////////////////////////////////////////
#include ""
1
#include ""
#include ""
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CBase64::CBase64()
{
}
CBase64::~CBase64()
{
}
/*
Base64是MIME邮件中常用的编码方式之一。它的主要思想是将输入的字符串