mirror of
https://github.com/danog/tgseclib.git
synced 2025-01-22 05:51:20 +01: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…
x
Reference in New Issue
Block a user