Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reproducible fingerprints #77

Open
wirelyre opened this issue Oct 4, 2023 · 1 comment
Open

Reproducible fingerprints #77

wirelyre opened this issue Oct 4, 2023 · 1 comment

Comments

@wirelyre
Copy link

wirelyre commented Oct 4, 2023

It would be nice to be able to reproduce fingerprints exactly!

Right now the only configuration options are "initialize to 0" (reproducible) or "use the thread RNG" (not reproducible), but maybe you could optionally pass in your own RNG.

xorf/src/prelude/mod.rs

Lines 92 to 110 in def7fcd

macro_rules! make_fp_block(
($size:ident) => {
{
#[cfg(feature = "uniform-random")] {
use rand::Rng;
let mut rng = rand::thread_rng();
let mut block = Vec::with_capacity($size);
for _ in 0..$size {
block.push(rng.gen());
}
block.into_boxed_slice()
}
#[cfg(not(feature = "uniform-random"))] {
make_block!(with $size sets)
}
}
}
);

@ayazhafiz
Copy link
Owner

Seems reasonable. Happy to accept a patch for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants