RC4: use the parent encrypt / decrypt methods if openssl is being used

This commit is contained in:
terrafrost 2014-12-30 23:33:12 -06:00
parent 162e2f26cf
commit e3487c8adb

View File

@ -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);