mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-12 09:09:39 +01:00
Merge pull request #590 from cnelissen/MarkBaseAbstract
Mark Base as abstract * cnelissen/MarkBaseAbstract: Marked Base as abstract
This commit is contained in:
commit
9abd251cb2
@ -44,9 +44,8 @@ use phpseclib\Crypt\Hash;
|
|||||||
* @package Base
|
* @package Base
|
||||||
* @author Jim Wigginton <terrafrost@php.net>
|
* @author Jim Wigginton <terrafrost@php.net>
|
||||||
* @author Hans-Juergen Petrich <petrich@tronic-media.com>
|
* @author Hans-Juergen Petrich <petrich@tronic-media.com>
|
||||||
* @access public
|
|
||||||
*/
|
*/
|
||||||
class Base
|
abstract class Base
|
||||||
{
|
{
|
||||||
/**#@+
|
/**#@+
|
||||||
* @access public
|
* @access public
|
||||||
@ -1170,10 +1169,7 @@ class Base
|
|||||||
* @param String $in
|
* @param String $in
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
function _encryptBlock($in)
|
abstract function _encryptBlock($in);
|
||||||
{
|
|
||||||
user_error(__METHOD__ . '() must extend by class ' . get_class($this), E_USER_ERROR);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decrypts a block
|
* Decrypts a block
|
||||||
@ -1184,10 +1180,7 @@ class Base
|
|||||||
* @param String $in
|
* @param String $in
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
function _decryptBlock($in)
|
abstract function _decryptBlock($in);
|
||||||
{
|
|
||||||
user_error(__METHOD__ . '() must extend by class ' . get_class($this), E_USER_ERROR);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup the key (expansion)
|
* Setup the key (expansion)
|
||||||
@ -1199,10 +1192,7 @@ class Base
|
|||||||
* @see \phpseclib\Crypt\Base::_setup()
|
* @see \phpseclib\Crypt\Base::_setup()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _setupKey()
|
abstract function _setupKey();
|
||||||
{
|
|
||||||
user_error(__METHOD__ . '() must extend by class ' . get_class($this), E_USER_ERROR);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup the self::ENGINE_INTERNAL $engine
|
* Setup the self::ENGINE_INTERNAL $engine
|
||||||
|
@ -219,6 +219,27 @@ class RC4 extends Base
|
|||||||
return $this->_crypt($ciphertext, self::DECRYPT);
|
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)
|
* Setup the key (expansion)
|
||||||
|
Loading…
Reference in New Issue
Block a user