Improved lk scrambling function.
This actually gets very close to the behavior of a full per-bit hash, except that you still need a fairly random seed.
This commit is contained in:
parent
22b7151919
commit
b776bf56b8
|
@ -80,6 +80,7 @@ fn lk_scramble(mut n: u32, scramble: u32) -> u32 {
|
|||
n = n.wrapping_add(scramble);
|
||||
for &p in PERMS.iter() {
|
||||
n ^= n.wrapping_mul(p);
|
||||
n += n << 1;
|
||||
}
|
||||
n
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user