- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
Base64.h
资源名称:MiniCA2.rar [点击查看]
上传用户:dengkfang
上传日期:2008-12-30
资源大小:5233k
文件大小:2k
源码类别:
CA认证
开发平台:
Visual C++
- /*
- Module : Base64.h
- Purpose: Defines the interface for a simple base64 decoding class
- Created: PJN / 22-04-1999
- Copyright (c) 1999 - 2004 by PJ Naughter. (Web: www.naughter.com, Email: pjna@naughter.com)
- All rights reserved.
- Copyright / Usage Details:
- You are allowed to include the source code in any product (commercial, shareware, freeware or otherwise)
- when your product is released in binary form. You are allowed to modify the source code in any way you want
- except you cannot modify the copyright details at the top of each module. If you want to distribute source
- code with your application, then you are only allowed to distribute versions released by the author. This is
- to maintain a single distribution point for the source code.
- */
- /////////////////////////////// Defines ///////////////////////////////////////
- #ifndef __BASE64_H__
- #define __BASE64_H__
- #ifndef SOCKMFC_EXT_CLASS
- #define SOCKMFC_EXT_CLASS
- #endif
- /////////////////////////////// Classes ///////////////////////////////////////
- class SOCKMFC_EXT_CLASS CBase64
- {
- public:
- //Defines
- #define BASE64_FLAG_NONE 0
- #define BASE64_FLAG_NOPAD 1
- #define BASE64_FLAG_NOCRLF 2
- //Methods
- int DecodeGetRequiredLength(int nSrcLen);
- int EncodeGetRequiredLength(int nSrcLen, DWORD dwFlags = BASE64_FLAG_NONE);
- BOOL Encode(const BYTE* pbSrcData, int nSrcLen, LPSTR szDest, int* pnDestLen, DWORD dwFlags = BASE64_FLAG_NONE);
- BOOL Decode(LPCSTR szSrc, int nSrcLen, BYTE* pbDest, int* pnDestLen);
- protected:
- int DecodeChar(unsigned int ch);
- };
- #endif //__BASE64_H__