Skip to content

Conversation

pitdicker
Copy link
Contributor

#508 Rebased on the 0.5 branch.

This is (in my opinion) the proper fix for #503: make OsRng unavailable if the platform is not supported.

This also makes JitterRng::new unavailable on Wasm.

EntropyRng already had tricky logic. Making it work nicely when OsRng and/or JitterRng are not available at compile time complicates it further. And I didn't want to think how it was going to look when we want to add some configurable third entropy source.

I have tried to rewrite EntropyRng to have hopefully simpler logic. Because we need wrappers for OsRng and JitterRng to make it compile on all platforms, I went all the way and added a little trait to ease implementation.

@pitdicker
Copy link
Contributor Author

I wonder why Travis doesn't run?

@pitdicker
Copy link
Contributor Author

I am going to merge, so I can then do the merge of 0.5 in master, but will keep an eye on the Travis build that should start up for the 0.5 branch.

@pitdicker pitdicker merged commit 3320597 into rust-random:0.5 Jun 15, 2018
@pitdicker pitdicker deleted the complicate_entropy_rng_0.5 branch June 15, 2018 17:34
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.

2 participants