Skip to content

Reproducible fingerprints #77

@wirelyre

Description

@wirelyre

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)
}
}
}
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions