#1 Open
Repository
FSMaxB
Branch
improved-random
Repository
jvdl
Branch
master

Use uniformly distributed, cryptographically secure random numbers.

Bitbucket cannot automatically merge this request.

The commits that make up this pull request have been removed.

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

git checkout master
git remote add FSMaxB/correcthorsebatterystaple https://bitbucket.org/FSMaxB/correcthorsebatterystaple.git
git fetch FSMaxB/correcthorsebatterystaple
git merge --no-ff -m 'Merged in FSMaxB/correcthorsebatterystaple/improved-random (pull request #1)' remotes/FSMaxB/correcthorsebatterystaple/improved-random
Author
  1. FSMaxB
Reviewers
Description

This introduces a new function getUniformRandomInteger that uses the crypto API and produces uniformly distributed random numbers.

It will throw an Error when the crypto API is not available and alert the user (I can change this and fall back to using Math.random() in this case if you want though).

Comments (4)