From 7ce96d93375356745b7a97f68c3468f921df2259 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Fri, 18 Feb 2022 01:45:29 -0600 Subject: [PATCH] Crypt/Base: sodium_increment uses the opposite endianness --- phpseclib/Crypt/Base.php | 2 ++ 1 file changed, 2 insertions(+) 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; }