📄 fileblowfish.h
字号:
/**********************************************************************
* Developed by;
* Neal Horman - neal@wanlink.com - http://www.wanlink.com
* Copyright (c) 2002 Neal Horman, All Rights Reserved
*
* This file/code may be used, modified, and distributed, for any
* purpose providing that this notice and the copyright notice above
* is left fully intact, unaltered, and any modifications, additions,
* or bug fixes are clearly marked as such.
*
* This file/code is provided "as is" with no express or implied
* warranty of any kind whatsoever. The author expressly accepts no
* liability for any possible damages incurred as a result of it's use.
* Use it at your own risk.
*
* Expect bugs.
*
* Portions Copyright (C) Microsoft Corporation
*
* RCSID: $Id$
*
* DESCRIPTION:
* application: BlowFishDocView Demo
* source module: FileBlowFish.h
*
**********************************************************************/
// FileBlowFish.h: interface for the CFileBlowFish class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_FILEBLOWFISH_H__BD9474CE_BA29_4442_8E5C_B68FE4396144__INCLUDED_)
#define AFX_FILEBLOWFISH_H__BD9474CE_BA29_4442_8E5C_B68FE4396144__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "BlowFish.h"
class CFileBlowFish : public CFile
{
public:
// Construction
DECLARE_DYNAMIC(CFileBlowFish);
CFileBlowFish() { MemberInit(); };
CFileBlowFish(int hFile) : CFile(hFile) { MemberInit(); };
CFileBlowFish(LPCTSTR lpszFileName, UINT nOpenFlags) : CFile(lpszFileName, nOpenFlags) { MemberInit(); };
// Destruction
virtual ~CFileBlowFish();
// Overridables
virtual BOOL Open( LPCTSTR lpszFileName, UINT nOpenFlags, CFileException* pError = NULL );
virtual LONG Seek( LONG lOff, UINT nFrom );
virtual DWORD GetPosition( ) const;
virtual void SetLength( DWORD dwNewLen );
virtual CFile *Duplicate() const;
virtual UINT Read(void* lpBuf, UINT nCount);
virtual void Write(const void* lpBuf, UINT nCount);
protected:
void * GetCodecBuf(unsigned int nCount = (64 * 1024));
void MemberInit();
CBlowFish m_Cypher;
void *m_pCodecBuf;
unsigned int m_CodecBufSize;
char m_magicCookie[8];
BOOL m_bFirstWrite;
BOOL m_bCodecIng;
};
#endif // !defined(AFX_FILEBLOWFISH_H__BD9474CE_BA29_4442_8E5C_B68FE4396144__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -