-rw-r--r-- | frontend/beta/js/Clipperz/Crypto/PRNG.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend/beta/js/Clipperz/Crypto/PRNG.js b/frontend/beta/js/Clipperz/Crypto/PRNG.js index 92966d0..6fdeca4 100644 --- a/frontend/beta/js/Clipperz/Crypto/PRNG.js +++ b/frontend/beta/js/Clipperz/Crypto/PRNG.js | |||
@@ -307,27 +307,27 @@ Clipperz.Crypto.PRNG.CryptoRandomRandomnessSource.prototype = MochiKit.Base.upda | |||
307 | }, | 307 | }, |
308 | 308 | ||
309 | 'browserCrypto': function () { | 309 | 'browserCrypto': function () { |
310 | return this._browserCrypto; | 310 | return this._browserCrypto; |
311 | }, | 311 | }, |
312 | 312 | ||
313 | //------------------------------------------------------------------------- | 313 | //------------------------------------------------------------------------- |
314 | 314 | ||
315 | 'collectEntropy': function() { | 315 | 'collectEntropy': function() { |
316 | varbytesToCollect; | 316 | varbytesToCollect; |
317 | 317 | ||
318 | if (this.boostMode() == true) { | 318 | if (this.boostMode() == true) { |
319 | bytesToCollect = 8; | 319 | bytesToCollect = 64; |
320 | } else { | 320 | } else { |
321 | bytesToCollect = 32; | 321 | bytesToCollect = 8; |
322 | } | 322 | } |
323 | 323 | ||
324 | var randomValuesArray = new Uint8Array(bytesToCollect); | 324 | var randomValuesArray = new Uint8Array(bytesToCollect); |
325 | this.browserCrypto().getRandomValues(randomValuesArray); | 325 | this.browserCrypto().getRandomValues(randomValuesArray); |
326 | for (var i = 0; i < randomValuesArray.length; i++) { | 326 | for (var i = 0; i < randomValuesArray.length; i++) { |
327 | this.updateGeneratorWithValue(randomValuesArray[i]); | 327 | this.updateGeneratorWithValue(randomValuesArray[i]); |
328 | } | 328 | } |
329 | 329 | ||
330 | setTimeout(this.collectEntropy, this.intervalTime()); | 330 | setTimeout(this.collectEntropy, this.intervalTime()); |
331 | }, | 331 | }, |
332 | 332 | ||
333 | //------------------------------------------------------------------------- | 333 | //------------------------------------------------------------------------- |