diff --git a/phpseclib/Crypt/Common/StreamCipher.php b/phpseclib/Crypt/Common/StreamCipher.php index 00107803..bb176cfe 100644 --- a/phpseclib/Crypt/Common/StreamCipher.php +++ b/phpseclib/Crypt/Common/StreamCipher.php @@ -24,4 +24,14 @@ namespace phpseclib3\Crypt\Common; */ abstract class StreamCipher extends SymmetricKey { + /** + * Stream ciphers not use an IV + * + * @access public + * @return bool + */ + public function usesIV() + { + return false; + } } diff --git a/phpseclib/Crypt/RC4.php b/phpseclib/Crypt/RC4.php index 35efd30a..8d791f6c 100644 --- a/phpseclib/Crypt/RC4.php +++ b/phpseclib/Crypt/RC4.php @@ -161,17 +161,6 @@ class RC4 extends StreamCipher return parent::isValidEngineHelper($engine); } - /** - * RC4 does not use an IV - * - * @access public - * @return bool - */ - public function usesIV() - { - return false; - } - /** * Sets the key length * diff --git a/phpseclib/Crypt/Salsa20.php b/phpseclib/Crypt/Salsa20.php index ba60af6e..9d35dafa 100644 --- a/phpseclib/Crypt/Salsa20.php +++ b/phpseclib/Crypt/Salsa20.php @@ -107,16 +107,6 @@ class Salsa20 extends StreamCipher parent::__construct('stream'); } - /** - * Salsa20 does not use an IV - * - * @return bool - */ - public function usesIV() - { - return false; - } - /** * Salsa20 uses a nonce *