mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-04 22:00:19 -05:00
Make the hash size configurable
Only at source code level.
This commit is contained in:
parent
7c910af3f9
commit
5b06549ee3
16 changed files with 115 additions and 78 deletions
|
|
@ -52,11 +52,11 @@ void state_rehash(struct snapraid_state* state)
|
|||
|
||||
/* copy the present hash as previous one */
|
||||
state->prevhash = state->hash;
|
||||
memcpy(state->prevhashseed, state->hashseed, HASH_SIZE);
|
||||
memcpy(state->prevhashseed, state->hashseed, HASH_MAX);
|
||||
|
||||
/* set the new hash and seed */
|
||||
state->hash = state->besthash;
|
||||
if (randomize(state->hashseed, HASH_SIZE) != 0) {
|
||||
if (randomize(state->hashseed, HASH_MAX) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Failed to get random values.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue