Clear hash state object once hash is finalized
This commit is contained in:
parent
92041f9fbf
commit
96f9b11cf2
4
puer.c
4
puer.c
|
@ -211,4 +211,8 @@ void finalize_hash(struct hashstate *state, unsigned char hash[32]) {
|
|||
for (size_t i = 0; i < 4; i++) {
|
||||
word2bytes(&hash[i*4 + 16], state->b[i]);
|
||||
}
|
||||
|
||||
// Clear all of the hash state, in case there was sth important
|
||||
// there
|
||||
explicit_bzero(state, sizeof(struct hashstate));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue