Removed chatty library (See issue #36).
This commit is contained in:
parent
bdcdfdabec
commit
5c776a83ff
@ -4,7 +4,9 @@ var defineProperty = require('./properties.js').defineProperty;
|
|||||||
|
|
||||||
var crypto = global.crypto || global.msCrypto;
|
var crypto = global.crypto || global.msCrypto;
|
||||||
if (!crypto || !crypto.getRandomValues) {
|
if (!crypto || !crypto.getRandomValues) {
|
||||||
|
|
||||||
console.log('WARNING: Missing strong random number source; using weak randomBytes');
|
console.log('WARNING: Missing strong random number source; using weak randomBytes');
|
||||||
|
|
||||||
crypto = {
|
crypto = {
|
||||||
getRandomValues: function(buffer) {
|
getRandomValues: function(buffer) {
|
||||||
for (var round = 0; round < 20; round++) {
|
for (var round = 0; round < 20; round++) {
|
||||||
@ -21,8 +23,6 @@ if (!crypto || !crypto.getRandomValues) {
|
|||||||
},
|
},
|
||||||
_weakCrypto: true
|
_weakCrypto: true
|
||||||
};
|
};
|
||||||
} else {
|
|
||||||
console.log('Found strong random number source');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function randomBytes(length) {
|
function randomBytes(length) {
|
||||||
|
Loading…
Reference in New Issue
Block a user