mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-05 13:07:53 +00:00
SymmetricKey: throw an exception when en/de-crypting w/o a key
This commit is contained in:
parent
50f9e1a71a
commit
5bcb298af7
@ -2133,6 +2133,10 @@ abstract class SymmetricKey
|
||||
throw new \UnexpectedValueException('No IV has been defined');
|
||||
}
|
||||
|
||||
if ($this->key === false) {
|
||||
throw new \UnexpectedValueException('No key has been defined');
|
||||
}
|
||||
|
||||
$this->encryptIV = $this->decryptIV = $this->iv;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user