cocos2d-x 文件MD5校验(6)
来源:未知 责任编辑:责任编辑 发表时间:2013-11-15 19:49 点击:次
p> DWORD T : MD5_TXX Transformation constant
p> NOTES: None
p> *****************************************************************************************/
p>void CMD5Checksum::HH( DWORD& A, DWORD B, DWORD C, DWORD D, DWORD X, DWORD S, DWORD T)
p>{
p> DWORD H = (B ^ C ^ D);
p> A += H + X + T;
p> A = RotateLeft(A, S);
p> A += B;
p>}
p>
p>
p>/*****************************************************************************************
p> FUNCTION: CMD5Checksum::II
p> DETAILS: protected
p> DESCRIPTION: Implementation of basic MD5 transformation algorithm
p> RETURNS: none
p> ARGUMENTS: DWORD &A, B, C, D : Current (partial) checksum
p> DWORD X : Input data
p> DWORD S : MD5_SXX Transformation constant
p> DWORD T : MD5_TXX Transformation constant
p> NOTES: None
p> *****************************************************************************************/
p>void CMD5Checksum::II( DWORD& A, DWORD B, DWORD C, DWORD D, DWORD X, DWORD S, DWORD T)
p>{
p> DWORD I = (C ^ (B | ~D));
p> A += I + X + T;
p> A = RotateLeft(A, S);
p> A += B;
p>}
p>
p>
p>/*****************************************************************************************
p> FUNCTION: CMD5Checksum::ByteToDWord
p> DETAILS: private
p> DESCRIPTION: Transfers the data in an 8 bit array to a 32 bit array
p> RETURNS: void
p> ARGUMENTS: DWORD* Output : the 32 bit (unsigned long) destination array
p> BYTE* Input : the 8 bit (unsigned char) source array
p> UINT nLength : the number of 8 bit data items in the source array
p> NOTES: Four BYTES from the input array are transferred to each DWORD entry
p> of the output array. The first BYTE is transferred to the bits (0-7)
p> of the output DWORD, the second BYTE to bits 8-15 etc.
p> The algorithm assumes that the input array is a multiple of 4 bytes long
p> so that there is a perfect fit into the array of 32 bit words.
p> *****************************************************************************************/
p>void CMD5Checksum::ByteToDWord(DWORD* Output, BYTE* Input, UINT nLength)
p>{
p> //entry invariants
p> ASSERT( nLength % 4 == 0 );
p> //ASSERT( AfxIsValidAddress(Output, nLength/4, TRUE) );
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>
您可能感兴趣的文章
- 《BREW进阶与精通——3G移动增值业务的运营、定制与开发》连载之
- cocos2d-x CCRotateTo 对初始角,旋转角的处理
- Cocos2d-x学习(一):HelloWorld
- ibatis 关联自己,怎么映射 xml ?
- Cocos2d-x 的“HelloLua” 深入分析
- cocos2d-x ActionManager控制精灵的暂停运动
- 用cocos2d-html5做的消除类游戏《英雄爱消除》(1)——系统主菜单
- cocos2dx Sprite setBlendFunc 使用颜色混合:加算,减算
- cocos2d-x在win32和iOS、android下获取当前系统时间的方法
- cocos2d-x 3.0rc 较于2.2v 诸多变化中的一些小点