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

📄 cmd5.h

📁 MD5码一种加密码形式
💻 H
字号:
// CMD5.h: interface for the CMD5 class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_CMD5_H__70164BD2_08BF_45B2_AC01_888D2B1C77A3__INCLUDED_)
#define AFX_CMD5_H__70164BD2_08BF_45B2_AC01_888D2B1C77A3__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CMD5  
{
public:
	CMD5();	//default ctor
	CMD5(const char* plainText);  //set plaintext in ctor
	void setPlainText(const char* plainText); //set plaintext with a mutator, it's ok to 
				                              //to call this multiple times, the digest is recalculated after each call.
	const char* getMD5Digest();	  //access message digest (aka hash), return 0 if plaintext has not been set

	virtual ~CMD5();
private:
	bool calcDigest(); //this function computes the digest by calling the RFC 1321 'C' code

	bool m_digestValid; //false until the plaintext has been set and digest computed
	unsigned char  m_digest[16]; //the numerical value of the digest
	char  m_digestString[33];  //Null terminated string value of the digest expressed in hex digits
	char* m_plainText; //a pointer to the plain text.  If casting away the const-ness 
	                   //worries you, you could either make a local copy of the plain 
	                   //text string instead of just pointing at the user's string or 
					   //modify the RFC 1321 code to take 'const' plaintext. 

};

#endif // !defined(AFX_CMD5_H__70164BD2_08BF_45B2_AC01_888D2B1C77A3__INCLUDED_)

⌨️ 快捷键说明

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