From 1e10a6ab7ae5642da85a69f4fe82bb2699f68ff5 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sat, 30 Jul 2022 18:11:00 -0500 Subject: [PATCH] fix bad merge --- phpseclib/Crypt/Blowfish.php | 4 ++-- phpseclib/Crypt/Common/SymmetricKey.php | 2 +- tests/Unit/Crypt/RSA/LoadKeyTest.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/phpseclib/Crypt/Blowfish.php b/phpseclib/Crypt/Blowfish.php index b5b3c9bb..dbe78843 100644 --- a/phpseclib/Crypt/Blowfish.php +++ b/phpseclib/Crypt/Blowfish.php @@ -59,7 +59,7 @@ * * This explains 3 of the 4 _encryptBlock() implementations. the last _encryptBlock() * implementation can best be understood by doing Ctrl + F and searching for where - * CRYPT_BASE_USE_SAFE_INTVAL is defined. + * self::$use_reg_intval is defined. * * # phpseclib's three different _setupKey() implementations * @@ -710,7 +710,7 @@ class Blowfish extends BlockCipher $l = $in[1]; $r = $in[2]; - list($r, $l) = CRYPT_BASE_USE_SAFE_INTVAL ? + list($r, $l) = self::$use_reg_intval ? self::encryptBlockHelperFast($l, $r, $sb_0, $sb_1, $sb_2, $sb_3, $p) : self::encryptBlockHelperSlow($l, $r, $sb_0, $sb_1, $sb_2, $sb_3, $p); diff --git a/phpseclib/Crypt/Common/SymmetricKey.php b/phpseclib/Crypt/Common/SymmetricKey.php index 6f4c6c9d..f8ed02b3 100644 --- a/phpseclib/Crypt/Common/SymmetricKey.php +++ b/phpseclib/Crypt/Common/SymmetricKey.php @@ -3207,7 +3207,7 @@ abstract class SymmetricKey */ protected static function safe_intval($x) { - if ($use_reg_intval || is_int($x)) { + if (self::$use_reg_intval || is_int($x)) { return $x; } return (fmod($x, 0x80000000) & 0x7FFFFFFF) | diff --git a/tests/Unit/Crypt/RSA/LoadKeyTest.php b/tests/Unit/Crypt/RSA/LoadKeyTest.php index 7872abd6..3cbbcd97 100644 --- a/tests/Unit/Crypt/RSA/LoadKeyTest.php +++ b/tests/Unit/Crypt/RSA/LoadKeyTest.php @@ -1274,7 +1274,7 @@ LrIZULwMa4nI4Y+RkFftEponSYw= -----END OPENSSH PRIVATE KEY----- '; - $key = PublicKeyLoader($key, 'test'); + $key = PublicKeyLoader::load($key, 'test'); $this->assertInstanceOf(PrivateKey::class, $key); } }