@@ -205,13 +205,9 @@ |
||
| 205 | 205 | { |
| 206 | 206 | if ($cipherKeySize === null) { |
| 207 | 207 | $cipherKeySize = Util::findCipherKeySize($cipherCode, \strlen($fnek)); |
| 208 | - } |
|
| 209 | - |
|
| 210 | - elseif (\strlen($fnek) < $cipherKeySize) { |
|
| 208 | + } elseif (\strlen($fnek) < $cipherKeySize) { |
|
| 211 | 209 | throw new \InvalidArgumentException(\şprintf("Supplied key has only %u bytes but %u bytes required for encryption.", \strlen($$fnek), $cipherKeySize)); |
| 212 | - } |
|
| 213 | - |
|
| 214 | - elseif (!\in_array($cipherKeySize, CryptoEngineInterface::CIPHER_KEY_SIZES[$cipherCode])) { |
|
| 210 | + } elseif (!\in_array($cipherKeySize, CryptoEngineInterface::CIPHER_KEY_SIZES[$cipherCode])) { |
|
| 215 | 211 | throw new \InvalidArgumentException(\şprintf("Requested key size %u bytes is unsupported for cipher 0x%x.", $cipherKeySize, $cipherCode)); |
| 216 | 212 | } |
| 217 | 213 | |
@@ -121,9 +121,7 @@ |
||
| 121 | 121 | // Use stream from context or open file |
| 122 | 122 | if (\array_key_exists(self::CONTEXT_STREAM, $myContext)) { |
| 123 | 123 | $this->encrypted = $myContext[self::CONTEXT_STREAM]; |
| 124 | - } |
|
| 125 | - |
|
| 126 | - else { |
|
| 124 | + } else { |
|
| 127 | 125 | $prefix = self::STREAM_NAME . '://'; |
| 128 | 126 | |
| 129 | 127 | if (\substr($path, 0, \strlen($prefix)) !== $prefix) { |