num-bigint icon indicating copy to clipboard operation
num-bigint copied to clipboard

BigInt Seed for a RNG?

Open sciguyryan opened this issue 3 years ago • 1 comments

This is a question (or a feature request, if it doesn't exist).

Is it possible to use a BigInt as a seed for a PRNG, and if so are there any examples of that? If not, is this something that could feasibly be added?

Thanks in advance.

sciguyryan avatar Aug 24 '21 12:08 sciguyryan

That depends on the RNG -- you can get raw bytes from a BigInt or BigUint, but then for rand you have to match your chosen RNG's SeedableRng::Seed type.

cuviper avatar Aug 24 '21 21:08 cuviper