360教程:是一个免费提供流行杀毒软件教程、在线学习分享的学习平台!

运用md5校验与算法保护文件

时间:2024/7/17作者:未知来源:360教程人气:

[摘要]~D)); A += I + X + T; A = RotateLeft(A, S); A += B;/***********************************************...
~D));
A += I + X + T;
A = RotateLeft(A, S);
A += B;
}


/*****************************************************************************************
FUNCTION:  CMD5Checksum::ByteToDWord
DETAILS:  private
DESCRIPTION: Transfers the data in an 8 bit array to a 32 bit array
RETURNS:  void
ARGUMENTS:  DWORD* Output : the 32 bit (unsigned long) destination array
    BYTE* Input   : the 8 bit (unsigned char) source array
    UINT nLength  : the number of 8 bit data items in the source array
NOTES:   Four BYTES from the input array are transferred to each DWORD entry
    of the output array. The first BYTE is transferred to the bits (0-7)
    of the output DWORD, the second BYTE to bits 8-15 etc.
    The algorithm assumes that the input array is a multiple of 4 bytes long
    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]   

关键词:运用md5校验与算法保护文件




Copyright © 2012-2018 360教程(http://www.360sd.cn) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版