diff --git a/phpseclib/Crypt/Base.php b/phpseclib/Crypt/Base.php index aad1eae8..b8d85f88 100644 --- a/phpseclib/Crypt/Base.php +++ b/phpseclib/Crypt/Base.php @@ -44,9 +44,8 @@ use phpseclib\Crypt\Hash; * @package Base * @author Jim Wigginton * @author Hans-Juergen Petrich - * @access public */ -class Base +abstract class Base { /**#@+ * @access public @@ -1170,10 +1169,7 @@ class Base * @param String $in * @return String */ - function _encryptBlock($in) - { - user_error(__METHOD__ . '() must extend by class ' . get_class($this), E_USER_ERROR); - } + abstract function _encryptBlock($in); /** * Decrypts a block @@ -1184,10 +1180,7 @@ class Base * @param String $in * @return String */ - function _decryptBlock($in) - { - user_error(__METHOD__ . '() must extend by class ' . get_class($this), E_USER_ERROR); - } + abstract function _decryptBlock($in); /** * Setup the key (expansion) @@ -1199,10 +1192,7 @@ class Base * @see \phpseclib\Crypt\Base::_setup() * @access private */ - function _setupKey() - { - user_error(__METHOD__ . '() must extend by class ' . get_class($this), E_USER_ERROR); - } + abstract function _setupKey(); /** * Setup the self::ENGINE_INTERNAL $engine diff --git a/phpseclib/Crypt/RC4.php b/phpseclib/Crypt/RC4.php index 74e4fe6b..71946650 100644 --- a/phpseclib/Crypt/RC4.php +++ b/phpseclib/Crypt/RC4.php @@ -219,6 +219,27 @@ class RC4 extends Base return $this->_crypt($ciphertext, self::DECRYPT); } + /** + * Encrypts a block + * + * @access private + * @param String $in + */ + function _encryptBlock($in) + { + // RC4 does not utilize this method + } + + /** + * Decrypts a block + * + * @access private + * @param String $in + */ + function _decryptBlock($in) + { + // RC4 does not utilize this method + } /** * Setup the key (expansion)