mirror of
https://github.com/danog/phpseclib.git
synced 2025-01-06 04:38:20 +01:00
Merge branch '2.0' into 3.0
This commit is contained in:
commit
b510af1cb5
@ -378,6 +378,11 @@ abstract class Strings
|
|||||||
*/
|
*/
|
||||||
public static function increment_str(&$var)
|
public static function increment_str(&$var)
|
||||||
{
|
{
|
||||||
|
if (function_exists('sodium_increment')) {
|
||||||
|
sodium_increment($var);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for ($i = 4; $i <= strlen($var); $i+= 4) {
|
for ($i = 4; $i <= strlen($var); $i+= 4) {
|
||||||
$temp = substr($var, -$i, 4);
|
$temp = substr($var, -$i, 4);
|
||||||
switch ($temp) {
|
switch ($temp) {
|
||||||
|
Loading…
Reference in New Issue
Block a user