From e3487c8adb4b3c79f10028f7dc174f81ce924427 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Tue, 30 Dec 2014 23:33:12 -0600 Subject: [PATCH] RC4: use the parent encrypt / decrypt methods if openssl is being used --- phpseclib/Crypt/RC4.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpseclib/Crypt/RC4.php b/phpseclib/Crypt/RC4.php index e2883fe0..07827e99 100644 --- a/phpseclib/Crypt/RC4.php +++ b/phpseclib/Crypt/RC4.php @@ -248,7 +248,7 @@ class Crypt_RC4 extends Crypt_Base */ function encrypt($plaintext) { - if ($this->engine == CRYPT_ENGINE_MCRYPT) { + if ($this->engine != CRYPT_ENGINE_INTERNAL) { return parent::encrypt($plaintext); } return $this->_crypt($plaintext, CRYPT_RC4_ENCRYPT); @@ -268,7 +268,7 @@ class Crypt_RC4 extends Crypt_Base */ function decrypt($ciphertext) { - if ($this->engine == CRYPT_ENGINE_MCRYPT) { + if ($this->engine != CRYPT_ENGINE_INTERNAL) { return parent::decrypt($ciphertext); } return $this->_crypt($ciphertext, CRYPT_RC4_DECRYPT);