mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 03:27:31 +00:00
stream ciphers don't use IVs
This commit is contained in:
parent
ce6d28789a
commit
cc45f18cb8
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
*
|
||||
|
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user