📄 md5.h
字号:
/*****************************************************************
*
* Reversed By yykingking (yykingking@126.com)
* 仅供学习交流使用
*****************************************************************/
#ifndef _MD5_H_
#define _MD5_H_
#include <stdio.h>
typedef unsigned long UINT4;
//typedef unsigned long UINT;
typedef unsigned char *POINTER;
typedef struct _MD5_CONTEXT_
{
UINT state[4];
UINT count[2];
unsigned char buffer[64];
}MD5CONTEXT, *PMD5CONTEXT;
#define md5_F(x, y, z) (((x) & (y)) | ((~x) & (z)))
#define md5_G(x, y, z) (((x) & (z)) | ((y) & (~z)))
#define md5_H(x, y, z) ((x) ^ (y) ^ (z))
#define md5_I(x, y, z) ((y) ^ ((x) | (~z)))
// ROTATE_LEFT rotates x left n bits.
// x<<<=n;
#define md5_ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
// FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
//Rotation is separate from addition to prevent recomputation.
#define FF(a, b, c, d, x, s, ac) { \
(a) += md5_F ((b), (c), (d)) + (x) + (ac); \
(a) = md5_ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define GG(a, b, c, d, x, s, ac) { \
(a) += md5_G ((b), (c), (d)) + (x) + (ac); \
(a) = md5_ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define HH(a, b, c, d, x, s, ac) { \
(a) += md5_H ((b), (c), (d)) + (x) + (ac); \
(a) = md5_ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define II(a, b, c, d, x, s, ac) { \
(a) += md5_I ((b), (c), (d)) + (x) + (ac); \
(a) = md5_ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -