1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-03 10:08:04 +01:00

Crypt/Base: use sodium_increment in _increment_str

This commit is contained in:
terrafrost 2022-02-17 22:50:56 -06:00
parent 45d2ddcbc4
commit 1ba024df94

View File

@ -2007,6 +2007,11 @@ class Crypt_Base
*/
function _increment_str(&$var)
{
if (function_exists('sodium_increment')) {
sodium_increment($var);
return;
}
for ($i = 4; $i <= strlen($var); $i+= 4) {
$temp = substr($var, -$i, 4);
switch ($temp) {