Base64编码及解码程序源代码

 

// Base64.h: 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_)

 

 

// Base64.cpp: implementation of the CBase64 class.
//
//

#include "stdafx.h"
#include "Base64.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//
// Construction/Destruction
//

CBase64::CBase64()
{

}

CBase64::~CBase64()
{

}


/*
Base64是MIME邮件中常用的编码方式之一。它的主要思想是将输入的字符串或数据编码成只含有{'A'-'Z'

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值