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

📄 haval.h

📁 hashish-1.1b加密算法库c++
💻 H
字号:
#ifndef CRYPTOPP_HAVAL_H#define CRYPTOPP_HAVAL_H#include "iterhash.h"NAMESPACE_BEGIN(CryptoPP)/// <a href="http://www.weidai.com/scan-mirror/md.html#HAVAL">HAVAL</a>class HAVAL : public IteratedHash<word32, LittleEndian, 128>{public:	enum {DIGESTSIZE = 32, HAVAL_VERSION = 1};	/// digestSize can be 16, 20, 24, 28, or 32 (Default=32)<br>	/// pass can be 3, 4 or 5 (Default=3)	HAVAL(unsigned int digestSize=DIGESTSIZE, unsigned int passes=3);	void TruncatedFinal(byte *hash, unsigned int size);	unsigned int DigestSize() const {return digestSize;}protected:	static const unsigned int wi2[32], wi3[32], wi4[32], wi5[32];	static const word32 mc2[32], mc3[32], mc4[32], mc5[32];	void Init();	void Tailor(unsigned int FPTLEN);	void vTransform(const word32 *in);	const unsigned int digestSize, pass;};/// <a href="http://www.weidai.com/scan-mirror/md.html#HAVAL">HAVAL</a> with 3 passesclass HAVAL3 : public HAVAL{public:	HAVAL3(unsigned int digestSize=DIGESTSIZE) : HAVAL(digestSize, 3) {}	static void Transform(word32 *buf, const word32 *in);};/// <a href="http://www.weidai.com/scan-mirror/md.html#HAVAL">HAVAL</a> with 4 passesclass HAVAL4 : public HAVAL{public:	HAVAL4(unsigned int digestSize=DIGESTSIZE) : HAVAL(digestSize, 4) {}	static void Transform(word32 *buf, const word32 *in);};/// <a href="http://www.weidai.com/scan-mirror/md.html#HAVAL">HAVAL</a> with 5 passesclass HAVAL5 : public HAVAL{public:	HAVAL5(unsigned int digestSize=DIGESTSIZE) : HAVAL(digestSize, 5) {}	static void Transform(word32 *buf, const word32 *in);};NAMESPACE_END#endif

⌨️ 快捷键说明

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