SymmetricKey: throw an exception when en/de-crypting w/o a key

This commit is contained in:
terrafrost 2018-12-02 12:01:56 -06:00
parent 50f9e1a71a
commit 5bcb298af7

View File

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