1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-11-30 04:39:02 +01:00

update last commit for 2.0 branch

This commit is contained in:
terrafrost 2019-09-07 19:53:19 -05:00
parent 43dd05d4c2
commit 18681de192

View File

@ -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 {