mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-09 15:20:58 +00:00
RC4: use the parent encrypt / decrypt methods if openssl is being used
This commit is contained in:
parent
162e2f26cf
commit
e3487c8adb
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user