1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-07 06:22:47 -05:00

Add smemclrs of all hash states we destroy.

This commit is contained in:
Simon Tatham
2015-04-26 23:55:33 +01:00
parent 9d5a164021
commit 16c46ecdaf
4 changed files with 12 additions and 0 deletions

View File

@ -210,6 +210,7 @@ void MD5Simple(void const *p, unsigned len, unsigned char output[16])
MD5Init(&s);
MD5Update(&s, (unsigned char const *)p, len);
MD5Final(output, &s);
smemclr(&s, sizeof(s));
}
/* ----------------------------------------------------------------------
@ -227,6 +228,7 @@ void *hmacmd5_make_context(void)
void hmacmd5_free_context(void *handle)
{
smemclr(handle, 3*sizeof(struct MD5Context));
sfree(handle);
}