Skip to content

Commit

Permalink
Fix PHP 5.6 intdiv
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-scott committed Feb 10, 2016
1 parent e9c2f00 commit c83f592
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/SeedSpring.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ protected function getNonce($increment = 0)
$nonce = \chr($ctr & 0xFF) . $nonce;
$ctr >>= 8;
}
$this->counter += (int) \floor($increment + ($increment % 16) / 16);
$incr = (int) \floor(($increment + ($increment % 16)) / 16);
$this->counter += $incr;
return \str_pad($nonce, 16, "\0", STR_PAD_LEFT);
}
}

0 comments on commit c83f592

Please sign in to comment.