Small tweak.

This commit is contained in:
LoRd_MuldeR 2020-10-16 23:50:16 +02:00
parent 1b5d8a7d4c
commit 476054fbb0
Signed by: mulder
GPG Key ID: 2B5913365F57E03F

View File

@ -78,7 +78,7 @@ static FORCE_INLINE uint64_t keygen_loop(uint64_t value, const uint16_t pepper,
{ {
for (size_t i = 0U; i < 99971U; ++i) for (size_t i = 0U; i < 99971U; ++i)
{ {
value = hash_code(value, pepper, passwd, passwd_len); value ^= hash_code(value, pepper, passwd, passwd_len);
} }
return value; return value;
} }
@ -121,11 +121,11 @@ static void random_seed(rand_state_t* const state, const uint64_t salt, const ui
key_data_t key; key_data_t key;
generate_key(&key, salt, pepper, passwd, passwd_len); generate_key(&key, salt, pepper, passwd, passwd_len);
random_init(state, key.a, key.b); random_init(state, key.a, key.b);
for (size_t i = 0U; i < (salt % 97U) + 13U; ++i)
{
random_next(state);
}
mcrypt_bzero(&key, sizeof(key_data_t)); mcrypt_bzero(&key, sizeof(key_data_t));
for (size_t i = 0U; i < 97U; ++i)
{
volatile uint32_t u = random_next(state);
}
} }
// ========================================================================== // ==========================================================================