Super simple implementation of a random number generator, which relies on Math.random().
| Parameter | Type | Description |
|---|---|---|
| prng | Function | function that returns an instance of PRNG (pseudo random number generator) with two methods: init(array) and next(). It should have a property "size" to indicate the required pool size. |
| noEvents | Boolean |
Optional if false or absent, onclick and onkeypress event will be used to add "randomness", otherwise events will not be used. |
Mix in a 32-bit integer into the pool
| Parameter | Type | Description |
|---|---|---|
| x | undefined |
Disconnects events, if any, preparing the object for GC.
Fills in an array of bytes with random numbers
| Parameter | Type | Description |
|---|---|---|
| byteArray | Array | array to be filled in with random numbers, only existing elements will be filled. |
Mix in the current time (w/milliseconds) into the pool