diff options
author | EdOverflow <diopterasec@gmail.com> | 2017-01-09 20:08:13 +0300 |
---|---|---|
committer | EdOverflow <diopterasec@gmail.com> | 2017-01-09 20:08:13 +0300 |
commit | 64f38eb370f6ab8220bdd91de204c21f008cc650 (patch) | |
tree | 4d49bbb860a6165115b2d9508126f1b632dcb0c0 /js/app/directives | |
parent | 563692e565bcaae0c6f805c234de12d156a56c21 (diff) |
Add sjcl.random.randomWords(1)
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 17231b00..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 * window.crypto.getRandomValues(new Uint32Array(1))), 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; |