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

Enhance seeding for random number generation #759

Merged
merged 2 commits into from
Nov 27, 2022

Conversation

paullouisageneau
Copy link
Owner

Follow-up on #757

This PR enhances seeding for random number generation, mostly for the sake of good practice as we are not dealing with cryptographically secure generators here.

Comment on lines +129 to +132
// Seed with high-resolution clock
using std::chrono::high_resolution_clock;
seed.push_back(
static_cast<unsigned int>(high_resolution_clock::now().time_since_epoch().count()));
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Nemirtingas Thanks for the suggestion!

@paullouisageneau paullouisageneau merged commit 6701a03 into master Nov 27, 2022
@paullouisageneau paullouisageneau deleted the utils-random-better-seed branch November 27, 2022 00:07
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

Successfully merging this pull request may close these issues.

1 participant