@@ -31,12 +31,10 @@ |
||
| 31 | 31 | if (!$success) { |
| 32 | 32 | try { |
| 33 | 33 | $random = random_bytes(static::IV_LENGTH); |
| 34 | - } |
|
| 35 | - catch (Exception $e) { |
|
| 34 | + } catch (Exception $e) { |
|
| 36 | 35 | if ($allowLessSecureIv) { |
| 37 | 36 | $random = $this->generateInsecureIv(static::IV_LENGTH); |
| 38 | - } |
|
| 39 | - else { |
|
| 37 | + } else { |
|
| 40 | 38 | throw new RuntimeException('Unable to generate initialization vector (IV)'); |
| 41 | 39 | } |
| 42 | 40 | } |