Initialize pptr to pseudo-random place before seeding.
This commit is contained in:
parent
b86d5883bc
commit
897ad54f5e
2 changed files with 2 additions and 2 deletions
|
@ -1628,7 +1628,7 @@ if (typeof Crypto == "undefined" || !Crypto.util) {
|
|||
sr.pool[sr.pptr++] = t >>> 8;
|
||||
sr.pool[sr.pptr++] = t & 255;
|
||||
}
|
||||
sr.pptr = 0;
|
||||
sr.pptr = Math.floor(sr.poolSize * Math.random());
|
||||
sr.seedTime();
|
||||
// entropy
|
||||
var entropyStr = "";
|
||||
|
|
|
@ -141,7 +141,7 @@
|
|||
sr.pool[sr.pptr++] = t >>> 8;
|
||||
sr.pool[sr.pptr++] = t & 255;
|
||||
}
|
||||
sr.pptr = 0;
|
||||
sr.pptr = Math.floor(sr.poolSize * Math.random());
|
||||
sr.seedTime();
|
||||
// entropy
|
||||
var entropyStr = "";
|
||||
|
|
Loading…
Reference in a new issue