summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4867216)
unsigned long hHash;
#else
MD5_Core_State core;
unsigned long hHash;
#else
MD5_Core_State core;
- unsigned char block[BLKSIZE];
+ unsigned char block[64];
int blkused;
uint32 lenhi, lenlo;
#endif
int blkused;
uint32 lenhi, lenlo;
#endif
#define subround(f,w,x,y,z,k,s,ti) \
w = x + rol(w + f(x,y,z) + block[k] + ti, s)
#define subround(f,w,x,y,z,k,s,ti) \
w = x + rol(w + f(x,y,z) + block[k] + ti, s)
-typedef struct {
- uint32 h[4];
-} MD5_Core_State;
-
void MD5_Core_Init(MD5_Core_State *s) {
s->h[0] = 0x67452301;
s->h[1] = 0xefcdab89;
void MD5_Core_Init(MD5_Core_State *s) {
s->h[0] = 0x67452301;
s->h[1] = 0xefcdab89;
void MD5Final(unsigned char output[16], struct MD5Context *s) {
int i;
void MD5Final(unsigned char output[16], struct MD5Context *s) {
int i;
unsigned char c[64];
uint32 lenhi, lenlo;
unsigned char c[64];
uint32 lenhi, lenlo;
memset(c, 0, pad);
c[0] = 0x80;
memset(c, 0, pad);
c[0] = 0x80;
c[7] = (lenhi >> 24) & 0xFF;
c[6] = (lenhi >> 16) & 0xFF;
c[7] = (lenhi >> 24) & 0xFF;
c[6] = (lenhi >> 16) & 0xFF;
c[1] = (lenlo >> 8) & 0xFF;
c[0] = (lenlo >> 0) & 0xFF;
c[1] = (lenlo >> 8) & 0xFF;
c[0] = (lenlo >> 0) & 0xFF;
for (i = 0; i < 4; i++) {
output[4*i+3] = (s->core.h[i] >> 24) & 0xFF;
for (i = 0; i < 4; i++) {
output[4*i+3] = (s->core.h[i] >> 24) & 0xFF;