This repository was archived by the owner on Jul 3, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ var EntropySource = require('./entropy-source');
1818var sources = require ( './sources' ) ;
1919var typeutils = require ( 'typeutils' ) ;
2020var getDefaultSource = sources . getDefaultSource ;
21- require ( './default -source' ) ;
21+ require ( './js-random -source' ) ;
2222
2323exports . EntropySource = EntropySource ;
2424exports . addEntropySource = sources . addEntropySource ;
Original file line number Diff line number Diff line change @@ -17,7 +17,9 @@ var isaac = require('./isaac-wrapper');
1717var EntropySource = require ( './entropy-source' ) ;
1818var sources = require ( './sources' ) ;
1919
20- var source = new EntropySource ( 'default' ) ;
20+ // Low quality entropy source based on Math.random() seed
21+ // and isaac CSPRNG
22+ var source = new EntropySource ( 'js-random' ) ;
2123source . ongetbytes = function ( u8 , cb ) {
2224 for ( var i = 0 ; i < u8 . length ; i ++ ) {
2325 u8 [ i ] = isaac . getByte ( ) ;
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ exports.addEntropySource = function(source) {
2121
2222 // Set this source as the default one
2323 defaultSource = source ;
24+ console . log ( '[random] using entropy source' , defaultSource . getName ( ) ) ;
2425} ;
2526
2627exports . getDefaultSource = function ( ) {
You can’t perform that action at this time.
0 commit comments