This repository was archived by the owner on Jul 3, 2020. It is now read-only.
Conversation
This reverts commit 5143479.
This reverts commit 5143479.
This reverts commit 519c783.
Conflicts: js/driver/virtio/index.js
- Move random 'none' source to another file - Rename some functions in random - Push Uint8Arrays to the queue and request them to be filled up instead of just loading the queue with random numbers - Get seed from method and use it for isaac.js to generate CS pseudo-random numbers instead of getting available randomness
* origin/pr/73: (26 commits) Fix some stuff Only make IRQ callback once Fix default random source Use IRQ callback in fillQueue, use one-time seed per source Optimize code a bit Lots of stuff, see details: Use Math.random if u8 === null Fix runtime.random.rand() New interface, better randomness, use isaac Revert "Revert "make rng unclassifed"" Add isaac.js, don't use it yet Revert "make rng unclassifed" make rng unclassifed Fix parameters Fix some stuff Add optional callback to randomBytes Make functions sync, add randomBytes resolve conflicts Add isaac.js, don't use it yet Revert "make rng unclassifed" ...
Member
Author
|
Interesting, that on my linux machine in KVM getRandomValues outputs like 10 bytes a minute (same for |
Contributor
There was a problem hiding this comment.
Seems to me this shouldn't throw. Instead it use a length of 1.
Member
Author
There was a problem hiding this comment.
I'm not sure it's a good idea to silently return 1 byte buffer instead of error. Why do we want this convenience shortcut?
For example, browser throws when there are no arguments provided
crypto.getRandomValues()
VM931:2 Uncaught TypeError: Failed to execute 'getRandomValues' on 'Crypto': 1 argument required, but only 0 present.
at TypeError (native)
at <anonymous>:2:8
at Object.InjectedScript._evaluateOn (<anonymous>:905:140)
at Object.InjectedScript._evaluateAndWrap (<anonymous>:838:34)
at Object.InjectedScript.evaluate (<anonymous>:694:21)
Contributor
There was a problem hiding this comment.
Well, I guess. Nevermind, other than this, 👍!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #73 by @ArielAbreu
R = @ArielAbreu
Changes:
nonesource tojs-randomruntime-tools has new option
--virtio-rngthat enables virtio random source.