summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f9ce93b)
Signed-off-by: Roland Häder <roland@mxchange.org>
public static function hashScrypt($password, $salt = false, $N = 16384, $r = 8, $p = 1)
{
if ($N == 0 || ($N & ($N - 1)) != 0) {
public static function hashScrypt($password, $salt = false, $N = 16384, $r = 8, $p = 1)
{
if ($N == 0 || ($N & ($N - 1)) != 0) {
- throw new \InvalidArgumentException("N must be > 0 and a power of 2");
+ throw new \InvalidArgumentException('N must be > 0 and a power of 2');
}
if ($N > PHP_INT_MAX / 128 / $r) {
}
if ($N > PHP_INT_MAX / 128 / $r) {
- throw new \InvalidArgumentException("Parameter N is too large");
+ throw new \InvalidArgumentException('Parameter N is too large');
}
if ($r > PHP_INT_MAX / 128 / $p) {
}
if ($r > PHP_INT_MAX / 128 / $p) {
- throw new \InvalidArgumentException("Parameter r is too large");
+ throw new \InvalidArgumentException('Parameter r is too large');