⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 blowfish.h

📁 blowfish加密算法的编码类
💻 H
字号:
// Blowfish.h: interface for the CBlowfish class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_BLOWFISH_H__B3CA7224_0414_486C_9B4A_987CA54FD1F2__INCLUDED_)
#define AFX_BLOWFISH_H__B3CA7224_0414_486C_9B4A_987CA54FD1F2__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define swap(x,y,temp) temp=x;x=y;y=temp;
#define SBOX_BEGIN 18
class CBlowfish  
{
public:
	static const unsigned long pbox[18];
	static const unsigned long sbox[4][256];
	void Blowfish(char* szMessage,char type);
	void BlowfishDe(unsigned long& XL,unsigned long& XR);
	void BlowfishEn(unsigned long& XL,unsigned long& XR);
	void BlowfishKeyInit(const char* szKey,int nStrLen);
	CBlowfish();
	virtual ~CBlowfish();

private:
	unsigned long keybox[1042];
	unsigned long F(const char index[4]);
};

#endif // !defined(AFX_BLOWFISH_H__B3CA7224_0414_486C_9B4A_987CA54FD1F2__INCLUDED_)

⌨️ 快捷键说明

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