Merge branch '3.0'

This commit is contained in:
terrafrost 2024-08-02 09:37:13 -05:00
commit f6bf4471d9
2 changed files with 2 additions and 2 deletions

View File

@ -435,7 +435,7 @@ abstract class Strings
// return str_replace(['+', '/'], ['-', '_'], self::base64_encode($data));
return function_exists('sodium_bin2base64') ?
sodium_bin2base64($data, SODIUM_BASE64_VARIANT_URLSAFE) :
sodium_bin2base64($data, SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING) :
Base64UrlSafe::encode($data);
}

View File

@ -58,7 +58,7 @@ abstract class IEEE
{
$r = $r->toBytes();
$s = $s->toBytes();
$length >>= 3;
$length = (int) ceil($length / 8);
return str_pad($r, $length, "\0", STR_PAD_LEFT) . str_pad($s, $length, "\0", STR_PAD_LEFT);
}
}