X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=sshmd5.c;h=2fdb5900703327cf065a5455b38b40d66e084821;hb=f004bcca17a789356c32527a396b68b71a773db2;hp=7112d406065ac7299bb028e322a4dcdc720c3426;hpb=86c183f8e884f32ae3b1a6091e9043acfd43df94;p=PuTTY.git diff --git a/sshmd5.c b/sshmd5.c index 7112d406..2fdb5900 100644 --- a/sshmd5.c +++ b/sshmd5.c @@ -249,7 +249,7 @@ void hmacmd5_key(void *handle, void const *keyv, int len) MD5Init(&keys[1]); MD5Update(&keys[1], foo, 64); - memset(foo, 0, 64); /* burn the evidence */ + smemclr(foo, 64); /* burn the evidence */ } static void hmacmd5_key_16(void *handle, unsigned char *key) @@ -312,11 +312,7 @@ static void hmacmd5_do_hmac_ssh(void *handle, unsigned char const *blk, int len, { unsigned char seqbuf[16]; - seqbuf[0] = (unsigned char) ((seq >> 24) & 0xFF); - seqbuf[1] = (unsigned char) ((seq >> 16) & 0xFF); - seqbuf[2] = (unsigned char) ((seq >> 8) & 0xFF); - seqbuf[3] = (unsigned char) ((seq) & 0xFF); - + PUT_32BIT_MSB_FIRST(seqbuf, seq); hmacmd5_do_hmac_internal(handle, seqbuf, 4, blk, len, hmac); }