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

BigInt Seed for a RNG? #215

Open
sciguyryan opened this issue Aug 24, 2021 · 1 comment
Open

BigInt Seed for a RNG? #215

sciguyryan opened this issue Aug 24, 2021 · 1 comment

Comments

@sciguyryan
Copy link

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.

@cuviper
Copy link
Member

cuviper commented Aug 24, 2021

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.

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