diff options
author | brantje <brantje@gmail.com> | 2017-01-10 03:00:00 +0300 |
---|---|---|
committer | brantje <brantje@gmail.com> | 2017-01-10 03:00:00 +0300 |
commit | a3788c3717b03fa5cfe883871d644b1c13603772 (patch) | |
tree | ab718691ce300188c992b68951f0ac03a0a5fde0 /js/app/directives | |
parent | ada8b5e0f490f54e242df92aef754ef9106106aa (diff) | |
parent | 64f38eb370f6ab8220bdd91de204c21f008cc650 (diff) |
Merge remote-tracking branch 'EdOverflow/random'
Diffstat (limited to 'js/app/directives')
-rw-r--r-- | js/app/directives/passwordgen.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/js/app/directives/passwordgen.js b/js/app/directives/passwordgen.js index f53f3bc2..afaeac02 100644 --- a/js/app/directives/passwordgen.js +++ b/js/app/directives/passwordgen.js @@ -130,7 +130,7 @@ if (crypt_obj = null, "undefined" != typeof window && void 0 !== window.crypto ? crypt_obj = window.crypto : "undefined" != typeof window && void 0 !== window.msCrypto && (crypt_obj = window.msCrypto), void 0 !== crypt_obj && "function" == typeof crypt_obj.getRandomValues && rng_psize > rng_pptr)for (num = Math.floor((rng_psize - rng_pptr) / 2) + 1, buf = new Uint16Array(num), crypt_obj.getRandomValues(buf), i = 0; i < buf.length; i++)t = buf[i], rng_pool[rng_pptr++] = t >>> 8, rng_pool[rng_pptr++] = 255 & t } catch (e) { } - for (; rng_psize > rng_pptr;)t = Math.floor(65536 * Math.random()), rng_pool[rng_pptr++] = t >>> 8, rng_pool[rng_pptr++] = 255 & t + for (; rng_psize > rng_pptr;)t = Math.floor(65536 * sjcl.random.randomWords(1)), rng_pool[rng_pptr++] = t >>> 8, rng_pool[rng_pptr++] = 255 & t rng_pptr = 0, rng_seed_time() } SecureRandom.prototype.nextBytes = rng_get_bytes; |