projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cosmetic, to fix ssh2-des-cbc-is-std
[u/mdw/putty]
/
sshmd5.c
diff --git
a/sshmd5.c
b/sshmd5.c
index
22c3e65
..
7fbd8c7
100644
(file)
--- a/
sshmd5.c
+++ b/
sshmd5.c
@@
-19,7
+19,7
@@
#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)
-void MD5_Core_Init(MD5_Core_State * s)
+
static
void MD5_Core_Init(MD5_Core_State * s)
{
s->h[0] = 0x67452301;
s->h[1] = 0xefcdab89;
{
s->h[0] = 0x67452301;
s->h[1] = 0xefcdab89;
@@
-27,7
+27,7
@@
void MD5_Core_Init(MD5_Core_State * s)
s->h[3] = 0x10325476;
}
s->h[3] = 0x10325476;
}
-void MD5_Block(MD5_Core_State * s, uint32 * block)
+
static
void MD5_Block(MD5_Core_State * s, uint32 * block)
{
uint32 a, b, c, d;
{
uint32 a, b, c, d;
@@
-210,7
+210,7
@@
void MD5Final(unsigned char output[16], struct MD5Context *s)
static void *md5_make_context(void)
{
static void *md5_make_context(void)
{
- return s
malloc(2*sizeof(struct MD5Context)
);
+ return s
newn(2, struct MD5Context
);
}
static void md5_free_context(void *handle)
}
static void md5_free_context(void *handle)
@@
-233,8
+233,8
@@
static void md5_key_internal(void *handle, unsigned char *key, int len)
memset(foo, 0x5C, 64);
for (i = 0; i < len && i < 64; i++)
foo[i] ^= key[i];
memset(foo, 0x5C, 64);
for (i = 0; i < len && i < 64; i++)
foo[i] ^= key[i];
- MD5Init(&keys[
0
]);
- MD5Update(&keys[
0
], foo, 64);
+ MD5Init(&keys[
1
]);
+ MD5Update(&keys[
1
], foo, 64);
memset(foo, 0, 64); /* burn the evidence */
}
memset(foo, 0, 64); /* burn the evidence */
}