stream ciphers don't use IVs

This commit is contained in:
terrafrost 2020-05-12 08:15:40 -05:00
parent ce6d28789a
commit cc45f18cb8
3 changed files with 10 additions and 21 deletions

View File

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

View File

@ -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
*

View File

@ -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
*