亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? md5checksum.cpp

?? MD5算法的VC示例,非常 好!
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
				so that there is a perfect fit into the array of 32 bit words.
*****************************************************************************************/
void CMD5Checksum::ByteToDWord(DWORD* Output, BYTE* Input, UINT nLength)
{
	//entry invariants
	ASSERT( nLength % 4 == 0 );
	ASSERT( AfxIsValidAddress(Output, nLength/4, TRUE) );
	ASSERT( AfxIsValidAddress(Input, nLength, FALSE) );

	//initialisations
	UINT i=0;	//index to Output array
	UINT j=0;	//index to Input array

	//transfer the data by shifting and copying
	for ( ; j < nLength; i++, j += 4)
	{
		Output[i] = (ULONG)Input[j]			| 
					(ULONG)Input[j+1] << 8	| 
					(ULONG)Input[j+2] << 16 | 
					(ULONG)Input[j+3] << 24;
	}
}

/*****************************************************************************************
FUNCTION:		CMD5Checksum::Transform
DETAILS:		protected
DESCRIPTION:	MD5 basic transformation algorithm;  transforms 'm_lMD5'
RETURNS:		void
ARGUMENTS:		BYTE Block[64]
NOTES:			An MD5 checksum is calculated by four rounds of 'Transformation'.
				The MD5 checksum currently held in m_lMD5 is merged by the 
				transformation process with data passed in 'Block'.  
*****************************************************************************************/
void CMD5Checksum::Transform(BYTE Block[64])
{
	//initialise local data with current checksum
	ULONG a = m_lMD5[0];
	ULONG b = m_lMD5[1];
	ULONG c = m_lMD5[2];
	ULONG d = m_lMD5[3];

	//copy BYTES from input 'Block' to an array of ULONGS 'X'
	ULONG X[16];
	ByteToDWord( X, Block, 64 );

	//Perform Round 1 of the transformation
	FF (a, b, c, d, X[ 0], MD5_S11, MD5_T01); 
	FF (d, a, b, c, X[ 1], MD5_S12, MD5_T02); 
	FF (c, d, a, b, X[ 2], MD5_S13, MD5_T03); 
	FF (b, c, d, a, X[ 3], MD5_S14, MD5_T04); 
	FF (a, b, c, d, X[ 4], MD5_S11, MD5_T05); 
	FF (d, a, b, c, X[ 5], MD5_S12, MD5_T06); 
	FF (c, d, a, b, X[ 6], MD5_S13, MD5_T07); 
	FF (b, c, d, a, X[ 7], MD5_S14, MD5_T08); 
	FF (a, b, c, d, X[ 8], MD5_S11, MD5_T09); 
	FF (d, a, b, c, X[ 9], MD5_S12, MD5_T10); 
	FF (c, d, a, b, X[10], MD5_S13, MD5_T11); 
	FF (b, c, d, a, X[11], MD5_S14, MD5_T12); 
	FF (a, b, c, d, X[12], MD5_S11, MD5_T13); 
	FF (d, a, b, c, X[13], MD5_S12, MD5_T14); 
	FF (c, d, a, b, X[14], MD5_S13, MD5_T15); 
	FF (b, c, d, a, X[15], MD5_S14, MD5_T16); 

	//Perform Round 2 of the transformation
	GG (a, b, c, d, X[ 1], MD5_S21, MD5_T17); 
	GG (d, a, b, c, X[ 6], MD5_S22, MD5_T18); 
	GG (c, d, a, b, X[11], MD5_S23, MD5_T19); 
	GG (b, c, d, a, X[ 0], MD5_S24, MD5_T20); 
	GG (a, b, c, d, X[ 5], MD5_S21, MD5_T21); 
	GG (d, a, b, c, X[10], MD5_S22, MD5_T22); 
	GG (c, d, a, b, X[15], MD5_S23, MD5_T23); 
	GG (b, c, d, a, X[ 4], MD5_S24, MD5_T24); 
	GG (a, b, c, d, X[ 9], MD5_S21, MD5_T25); 
	GG (d, a, b, c, X[14], MD5_S22, MD5_T26); 
	GG (c, d, a, b, X[ 3], MD5_S23, MD5_T27); 
	GG (b, c, d, a, X[ 8], MD5_S24, MD5_T28); 
	GG (a, b, c, d, X[13], MD5_S21, MD5_T29); 
	GG (d, a, b, c, X[ 2], MD5_S22, MD5_T30); 
	GG (c, d, a, b, X[ 7], MD5_S23, MD5_T31); 
	GG (b, c, d, a, X[12], MD5_S24, MD5_T32); 

	//Perform Round 3 of the transformation
	HH (a, b, c, d, X[ 5], MD5_S31, MD5_T33); 
	HH (d, a, b, c, X[ 8], MD5_S32, MD5_T34); 
	HH (c, d, a, b, X[11], MD5_S33, MD5_T35); 
	HH (b, c, d, a, X[14], MD5_S34, MD5_T36); 
	HH (a, b, c, d, X[ 1], MD5_S31, MD5_T37); 
	HH (d, a, b, c, X[ 4], MD5_S32, MD5_T38); 
	HH (c, d, a, b, X[ 7], MD5_S33, MD5_T39); 
	HH (b, c, d, a, X[10], MD5_S34, MD5_T40); 
	HH (a, b, c, d, X[13], MD5_S31, MD5_T41); 
	HH (d, a, b, c, X[ 0], MD5_S32, MD5_T42); 
	HH (c, d, a, b, X[ 3], MD5_S33, MD5_T43); 
	HH (b, c, d, a, X[ 6], MD5_S34, MD5_T44); 
	HH (a, b, c, d, X[ 9], MD5_S31, MD5_T45); 
	HH (d, a, b, c, X[12], MD5_S32, MD5_T46); 
	HH (c, d, a, b, X[15], MD5_S33, MD5_T47); 
	HH (b, c, d, a, X[ 2], MD5_S34, MD5_T48); 

	//Perform Round 4 of the transformation
	II (a, b, c, d, X[ 0], MD5_S41, MD5_T49); 
	II (d, a, b, c, X[ 7], MD5_S42, MD5_T50); 
	II (c, d, a, b, X[14], MD5_S43, MD5_T51); 
	II (b, c, d, a, X[ 5], MD5_S44, MD5_T52); 
	II (a, b, c, d, X[12], MD5_S41, MD5_T53); 
	II (d, a, b, c, X[ 3], MD5_S42, MD5_T54); 
	II (c, d, a, b, X[10], MD5_S43, MD5_T55); 
	II (b, c, d, a, X[ 1], MD5_S44, MD5_T56); 
	II (a, b, c, d, X[ 8], MD5_S41, MD5_T57); 
	II (d, a, b, c, X[15], MD5_S42, MD5_T58); 
	II (c, d, a, b, X[ 6], MD5_S43, MD5_T59); 
	II (b, c, d, a, X[13], MD5_S44, MD5_T60); 
	II (a, b, c, d, X[ 4], MD5_S41, MD5_T61); 
	II (d, a, b, c, X[11], MD5_S42, MD5_T62); 
	II (c, d, a, b, X[ 2], MD5_S43, MD5_T63); 
	II (b, c, d, a, X[ 9], MD5_S44, MD5_T64); 

	//add the transformed values to the current checksum
	m_lMD5[0] += a;
	m_lMD5[1] += b;
	m_lMD5[2] += c;
	m_lMD5[3] += d;
}


/*****************************************************************************************
CONSTRUCTOR:	CMD5Checksum
DESCRIPTION:	Initialises member data
ARGUMENTS:		None
NOTES:			None
*****************************************************************************************/
CMD5Checksum::CMD5Checksum()
{
	// zero members
	memset( m_lpszBuffer, 0, 64 );
	m_nCount[0] = m_nCount[1] = 0;

	// Load magic state initialization constants
	m_lMD5[0] = MD5_INIT_STATE_0;
	m_lMD5[1] = MD5_INIT_STATE_1;
	m_lMD5[2] = MD5_INIT_STATE_2;
	m_lMD5[3] = MD5_INIT_STATE_3;
}

/*****************************************************************************************
FUNCTION:		CMD5Checksum::DWordToByte
DETAILS:		private
DESCRIPTION:	Transfers the data in an 32 bit array to a 8 bit array
RETURNS:		void
ARGUMENTS:		BYTE* Output  : the 8 bit destination array 
				DWORD* Input  : the 32 bit source array
				UINT nLength  : the number of 8 bit data items in the source array
NOTES:			One DWORD from the input array is transferred into four BYTES 
				in the output array. The first (0-7) bits of the first DWORD are 
				transferred to the first output BYTE, bits bits 8-15 are transferred from
				the second BYTE etc. 
				
				The algorithm assumes that the output array is a multiple of 4 bytes long
				so that there is a perfect fit of 8 bit BYTES into the 32 bit DWORDs.
*****************************************************************************************/
void CMD5Checksum::DWordToByte(BYTE* Output, DWORD* Input, UINT nLength )
{
	//entry invariants
	ASSERT( nLength % 4 == 0 );
	ASSERT( AfxIsValidAddress(Output, nLength, TRUE) );
	ASSERT( AfxIsValidAddress(Input, nLength/4, FALSE) );

	//transfer the data by shifting and copying
	UINT i = 0;
	UINT j = 0;
	for ( ; j < nLength; i++, j += 4) 
	{
		Output[j] =   (UCHAR)(Input[i] & 0xff);
		Output[j+1] = (UCHAR)((Input[i] >> 8) & 0xff);
		Output[j+2] = (UCHAR)((Input[i] >> 16) & 0xff);
		Output[j+3] = (UCHAR)((Input[i] >> 24) & 0xff);
	}
}


/*****************************************************************************************
FUNCTION:		CMD5Checksum::Final
DETAILS:		protected
DESCRIPTION:	Implementation of main MD5 checksum algorithm; ends the checksum calculation.
RETURNS:		CString : the final hexadecimal MD5 checksum result 
ARGUMENTS:		None
NOTES:			Performs the final MD5 checksum calculation ('Update' does most of the work,
				this function just finishes the calculation.) 
*****************************************************************************************/
CString CMD5Checksum::Final()
{
	//Save number of bits
	BYTE Bits[8];
	DWordToByte( Bits, m_nCount, 8 );

	//Pad out to 56 mod 64.
	UINT nIndex = (UINT)((m_nCount[0] >> 3) & 0x3f);
	UINT nPadLen = (nIndex < 56) ? (56 - nIndex) : (120 - nIndex);
	Update( PADDING, nPadLen );

	//Append length (before padding)
	Update( Bits, 8 );

	//Store final state in 'lpszMD5'
	const int nMD5Size = 16;
	unsigned char lpszMD5[ nMD5Size ];
	DWordToByte( lpszMD5, m_lMD5, nMD5Size );

	//Convert the hexadecimal checksum to a CString
	CString strMD5;
	for ( int i=0; i < nMD5Size; i++) 
	{
		CString Str;
		if (lpszMD5[i] == 0) {
			Str = CString("00");
		}
		else if (lpszMD5[i] <= 15) 	{
			Str.Format("0%x",lpszMD5[i]);
		}
		else {
			Str.Format("%x",lpszMD5[i]);
		}

		ASSERT( Str.GetLength() == 2 );
		strMD5 += Str;
	}
	ASSERT( strMD5.GetLength() == 32 );
	return strMD5;
}


/*****************************************************************************************
FUNCTION:		CMD5Checksum::Update
DETAILS:		protected
DESCRIPTION:	Implementation of main MD5 checksum algorithm
RETURNS:		void
ARGUMENTS:		BYTE* Input    : input block
				UINT nInputLen : length of input block
NOTES:			Computes the partial MD5 checksum for 'nInputLen' bytes of data in 'Input'
*****************************************************************************************/
void CMD5Checksum::Update( BYTE* Input,	ULONG nInputLen )
{
	//Compute number of bytes mod 64
	UINT nIndex = (UINT)((m_nCount[0] >> 3) & 0x3F);

	//Update number of bits
	if ( ( m_nCount[0] += nInputLen << 3 )  <  ( nInputLen << 3) )
	{
		m_nCount[1]++;
	}
	m_nCount[1] += (nInputLen >> 29);

	//Transform as many times as possible.
	UINT i=0;		
	UINT nPartLen = 64 - nIndex;
	if (nInputLen >= nPartLen) 	
	{
		memcpy( &m_lpszBuffer[nIndex], Input, nPartLen );
		Transform( m_lpszBuffer );
		for (i = nPartLen; i + 63 < nInputLen; i += 64) 
		{
			Transform( &Input[i] );
		}
		nIndex = 0;
	} 
	else 
	{
		i = 0;
	}

	// Buffer remaining input
	memcpy( &m_lpszBuffer[nIndex], &Input[i], nInputLen-i);
}


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人午夜激情在线| 日韩国产高清影视| 99热99精品| 中文字幕亚洲成人| 91同城在线观看| 一区二区三区不卡视频在线观看| 一本大道久久a久久综合婷婷| 亚洲伦理在线免费看| 欧美在线视频日韩| 日韩中文字幕区一区有砖一区 | 欧美亚洲一区二区三区四区| 亚洲伦理在线精品| 6080亚洲精品一区二区| 青青国产91久久久久久| 日韩精品一区二区三区中文不卡| 韩国av一区二区三区| 亚洲国产经典视频| 在线亚洲一区二区| 日韩电影一二三区| 国产精品免费视频一区| 欧美午夜视频网站| 国产伦精品一区二区三区视频青涩| 久久久久88色偷偷免费| 欧美在线色视频| 看电影不卡的网站| 国产精品女人毛片| 欧美一区永久视频免费观看| 成人午夜伦理影院| 丝袜亚洲另类欧美| 国产精品激情偷乱一区二区∴| 欧美专区亚洲专区| 国产精品996| 亚洲成人1区2区| 国产亚洲一本大道中文在线| 欧美午夜一区二区| 丁香婷婷综合网| 日产国产欧美视频一区精品| 欧美国产乱子伦| 欧美一区二区三区四区在线观看| 国产91精品露脸国语对白| 三级影片在线观看欧美日韩一区二区 | 欧美日韩国产综合一区二区三区| 精品在线播放午夜| 亚洲国产精品视频| 欧美激情一区二区三区在线| 欧美福利一区二区| 成人av一区二区三区| 久久精品免费看| 亚洲大片免费看| 国产精品传媒入口麻豆| 精品成a人在线观看| 欧美日韩成人在线一区| 99re这里只有精品6| 国产乱对白刺激视频不卡| 天堂成人免费av电影一区| 亚洲乱码日产精品bd| 国产亚洲一区字幕| 精品国产一区二区亚洲人成毛片 | 日本大胆欧美人术艺术动态 | 欧美高清视频www夜色资源网| 成人高清免费在线播放| 黑人精品欧美一区二区蜜桃| 丝袜美腿亚洲色图| 亚洲一卡二卡三卡四卡无卡久久 | 久久久精品中文字幕麻豆发布| 欧美精品日日鲁夜夜添| 色婷婷av一区| 91农村精品一区二区在线| 成人动漫视频在线| 丁香亚洲综合激情啪啪综合| 国产成人精品1024| 国产一区二区在线看| 久久成人羞羞网站| 韩国女主播成人在线观看| 麻豆国产91在线播放| 奇米888四色在线精品| 日韩成人dvd| 久久电影国产免费久久电影| 久久国内精品自在自线400部| 日韩中文字幕1| 免费观看一级特黄欧美大片| 日本一不卡视频| 日韩电影在线一区二区| 免费久久99精品国产| 久久激五月天综合精品| 欧美自拍丝袜亚洲| 在线国产电影不卡| 欧美亚洲一区二区在线观看| 欧美日本一区二区| 91精品国产综合久久精品麻豆| 欧美挠脚心视频网站| 欧美一区二区三区四区高清| 日韩视频一区二区三区在线播放| 日韩欧美国产小视频| 久久久亚洲精品石原莉奈 | 国产精品的网站| 亚洲精品国产a| 亚洲中国最大av网站| 日韩成人一级片| 国产酒店精品激情| 99久久伊人网影院| 欧美性猛交xxxx乱大交退制版| 欧美电影影音先锋| 久久精品无码一区二区三区| 中文字幕一区在线观看| 亚洲制服丝袜av| 久久成人免费网站| 99在线热播精品免费| 337p亚洲精品色噜噜| 国产午夜精品久久| 一区二区三区精品| 美女网站色91| 91视频观看视频| 欧美一区二区三区四区高清| 中文文精品字幕一区二区| 一区二区三区丝袜| 精品一区二区三区香蕉蜜桃| kk眼镜猥琐国模调教系列一区二区| 欧美色老头old∨ideo| 欧美精品一区二区三区视频| 亚洲丝袜另类动漫二区| 蜜臀国产一区二区三区在线播放| 国产成人在线视频网站| 欧美视频在线播放| 韩国欧美国产一区| 色天天综合久久久久综合片| 精品三级在线观看| 一区二区三区四区亚洲| 国产麻豆91精品| 91精品免费在线| 综合久久给合久久狠狠狠97色| 开心九九激情九九欧美日韩精美视频电影| www.欧美亚洲| 精品国产制服丝袜高跟| 亚洲国产一区二区三区青草影视| 国产精品中文字幕欧美| 欧美日韩成人激情| 亚洲视频在线观看一区| 国产综合色视频| 欧美专区在线观看一区| 中文字幕在线观看不卡| 久久国产人妖系列| 欧美日韩精品一区二区三区蜜桃| 欧美激情一区二区三区在线| 极品美女销魂一区二区三区免费| 欧美视频精品在线观看| 综合激情成人伊人| 国产91精品久久久久久久网曝门| 日韩一区二区三区精品视频| 一区二区三区毛片| 成人爽a毛片一区二区免费| 欧美不卡一区二区三区| 天天操天天干天天综合网| 日本韩国一区二区| 最新国产精品久久精品| 成人毛片在线观看| 国产欧美一区二区三区沐欲| 蜜桃视频第一区免费观看| 欧美日韩另类一区| 一区二区三区电影在线播| 99riav久久精品riav| 日韩毛片一二三区| 97久久超碰国产精品| 国产精品国产精品国产专区不蜜| 国产一区欧美日韩| 久久天天做天天爱综合色| 麻豆成人av在线| 欧美精品一区男女天堂| 久久国产综合精品| 久久综合久久鬼色中文字| 激情亚洲综合在线| 久久五月婷婷丁香社区| 国产在线播放一区二区三区| www国产成人| 国产成人综合亚洲网站| 国产精品天天看| 99在线精品一区二区三区| 成人免费一区二区三区在线观看| 99视频一区二区| 亚洲午夜在线视频| 欧美精品精品一区| 美女在线观看视频一区二区| 欧美刺激午夜性久久久久久久 | 国产精品一区二区在线观看不卡| 精品福利在线导航| 成人午夜电影网站| 一区二区三区日韩在线观看| 欧美日韩亚洲高清一区二区| 日本不卡在线视频| 精品99一区二区三区| 成人永久aaa| 伊人夜夜躁av伊人久久| 欧美丰满少妇xxxbbb| 国产一区二区91| 中文字幕av一区二区三区高 | 日韩一区日韩二区| 欧美精品一卡两卡| 国产精品资源站在线| 亚洲三级电影网站| 欧美一区二区啪啪|