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

add naive wasm32 support using extern date_now() #284

Closed
wants to merge 1 commit into from

Conversation

oussama
Copy link

@oussama oussama commented Mar 4, 2018

This is not a sophisticated solution but is better than panic and makes several libs that depend on rand work on wasm32

@oussama
Copy link
Author

oussama commented Mar 4, 2018

Seems it was already implemented. Closing

@oussama oussama closed this Mar 4, 2018
@pitdicker
Copy link
Contributor

Thanks for the effort anyway!

We gained WASM support only a few days ago, thanks to the work of @quininer in #272.

To be honest, date_now does not have a high enough resolution to get any meaningful amount of randomness. And we don't expect it to ever improve, because higher resolution would also open up browsers to fingerprinting and timing attacks. JitterRng will even reject the timer at runtime 😄. For OsRng the situation would be very much worse...

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