author | Giulio Cesare Solaroli <giulio.cesare@clipperz.com> | 2014-06-21 08:50:00 (UTC) |
---|---|---|
committer | Giulio Cesare Solaroli <giulio.cesare@clipperz.com> | 2014-06-21 09:20:16 (UTC) |
commit | 6dd16d9359e3a4dc306802588b09acd43947a606 (patch) (side-by-side diff) | |
tree | f3ab7778e037e42cb47c810f9d435d40de5adf15 /frontend/gamma/js | |
parent | a6852c93138f3c4596fb4df8bce5b7d19ef50478 (diff) | |
download | clipperz-6dd16d9359e3a4dc306802588b09acd43947a606.zip clipperz-6dd16d9359e3a4dc306802588b09acd43947a606.tar.gz clipperz-6dd16d9359e3a4dc306802588b09acd43947a606.tar.bz2 |
Inproved PRNG configuration
-rw-r--r-- | frontend/gamma/js/Clipperz/Crypto/PRNG.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend/gamma/js/Clipperz/Crypto/PRNG.js b/frontend/gamma/js/Clipperz/Crypto/PRNG.js index 7885429..80d972f 100644 --- a/frontend/gamma/js/Clipperz/Crypto/PRNG.js +++ b/frontend/gamma/js/Clipperz/Crypto/PRNG.js @@ -297,51 +297,51 @@ Clipperz.Crypto.PRNG.CryptoRandomRandomnessSource = function(args) { this._browserCrypto = args.browserCrypto; Clipperz.Crypto.PRNG.RandomnessSource.call(this, args); this.collectEntropy(); return this; } Clipperz.Crypto.PRNG.CryptoRandomRandomnessSource.prototype = MochiKit.Base.update(new Clipperz.Crypto.PRNG.RandomnessSource, { 'intervalTime': function() { return this._intervalTime; }, 'browserCrypto': function () { return this._browserCrypto; }, //------------------------------------------------------------------------- 'collectEntropy': function() { var bytesToCollect; if (this.boostMode() == true) { - bytesToCollect = 8; + bytesToCollect = 64; } else { - bytesToCollect = 32; + bytesToCollect = 8; } var randomValuesArray = new Uint8Array(bytesToCollect); this.browserCrypto().getRandomValues(randomValuesArray); for (var i = 0; i < randomValuesArray.length; i++) { this.updateGeneratorWithValue(randomValuesArray[i]); } setTimeout(this.collectEntropy, this.intervalTime()); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); //############################################################################# Clipperz.Crypto.PRNG.Fortuna = function(args) { var i,c; args = args || {}; this._key = args.seed || null; if (this._key == null) { |