diff --git a/phpseclib/Crypt/Base.php b/phpseclib/Crypt/Base.php index d4ce09f9..602f097c 100644 --- a/phpseclib/Crypt/Base.php +++ b/phpseclib/Crypt/Base.php @@ -2079,7 +2079,9 @@ abstract class Base function _increment_str(&$var) { if (function_exists('sodium_increment')) { + $var = strrev($var); sodium_increment($var); + $var = strrev($var); return; }