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