Skip to content

Commit

Permalink
Fix issue in clock drift generator affecting quality
Browse files Browse the repository at this point in the history
  • Loading branch information
rchouinard committed May 23, 2013
1 parent bd8eb44 commit 79805cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Generator/ClockDriftGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function generate($byteCount)
$entropy .= $counter1 . $counter2;
}

$rounds = (int) ($msecPerRound * 50 / (int) (($counter1 - $counter2) * 1000000));
$rounds = (int) ($msecPerRound * 50 / (int) (($counter2 - $counter1) * 1000000));
$iterations = $bytes * (int) (ceil(8 / $bitsPerRound));

for ($i = 0; $i < $iterations; $i++) {
Expand Down

0 comments on commit 79805cd

Please sign in to comment.