Advertisement

MD5文件验证

阅读量:

近期一个项目正在推进中

串口-GPRS 模块

补充一下:

CRC校验一般用于通信数据的校验。

MD5和SH1用于安全领域,比如文件校验、数字签名等。

测试时使用使用VS2013.

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
#define H(x, y, z) ((x) ^ (y) ^ (z))
#define I(x, y, z) ((y) ^ ((x) | (~z)))

#define RL(x, y) (((x) << (y)) | ((x) >> (32 - (y)))) //x向左循环移y位

#define PP(x) (x<<24)|((x<<8)&0xff0000)|((x>>8)&0xff00)| (x>>24) //将x高低位互换,例如PP(aabbccdd)=ddccbbaa

#define Function(a,b,c,d,x,s.ac) the value of a is equal to the sum of RL evaluated at (a plus th

全部评论 (0)

还没有任何评论哟~