From 18681de192d218b2ab7fafc2ddd21d59ddf0afd0 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sat, 7 Sep 2019 19:53:19 -0500 Subject: [PATCH] update last commit for 2.0 branch --- phpseclib/Net/SSH2.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index af4c0596..d67f694a 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -4560,22 +4560,22 @@ class SSH2 ); $engines = array( - CRYPT_ENGINE_OPENSSL, - CRYPT_ENGINE_MCRYPT, - CRYPT_ENGINE_INTERNAL + Base::ENGINE_OPENSSL, + Base::ENGINE_MCRYPT, + Base::ENGINE_INTERNAL ); $ciphers = array(); foreach ($engines as $engine) { foreach ($algos as $algo) { $obj = $this->_encryption_algorithm_to_crypt_instance($algo); - if (strtolower(get_class($obj)) == 'crypt_rijndael') { + if ($obj instanceof Rijndael) { $obj->setKeyLength(preg_replace('#[^\d]#', '', $algo)); } switch ($algo) { case 'arcfour128': case 'arcfour256': - if ($engine == CRYPT_ENGINE_INTERNAL) { + if ($engine == Base::ENGINE_INTERNAL) { $algos = array_diff($algos, array($algo)); $ciphers[] = $algo; } else {