@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | * @param string $iv The IV key to use. |
| 107 | 107 | * @param bool $verification Weather we should we try to verify the decryption. |
| 108 | 108 | * @return array|false Returns array or FALSE if an error occured |
| 109 | - * @throws Exception |
|
| 109 | + * @throws Exception |
|
| 110 | 110 | */ |
| 111 | 111 | public function encrypt_file($source, $dest = "", $key = "", $start = 0, $iv = 0, $verification = true, $recursive = false) |
| 112 | 112 | { |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | * @param int $start Start position for reading when doing incremental mode. |
| 238 | 238 | * @param string $iv The IV key to use. |
| 239 | 239 | * @return array|false Returns array or FALSE if an error occured |
| 240 | - * @throws Exception |
|
| 240 | + * @throws Exception |
|
| 241 | 241 | */ |
| 242 | 242 | public function decrypt_file($source, $dest = "", $key = "", $start = 0, $iv = 0, $recursive = false) |
| 243 | 243 | { |
@@ -260,22 +260,22 @@ discard block |
||
| 260 | 260 | |
| 261 | 261 | $write_mode = 'a'; |
| 262 | 262 | if (!$start) { |
| 263 | - $write_mode = 'w'; |
|
| 264 | - } |
|
| 263 | + $write_mode = 'w'; |
|
| 264 | + } |
|
| 265 | 265 | |
| 266 | - if ($this->verification) { |
|
| 267 | - $fpOut = fopen("php://stdout", $write_mode); |
|
| 268 | - } else { |
|
| 269 | - $fpOut = fopen($this->get_xcloner_path().$dest, $write_mode); |
|
| 270 | - } |
|
| 266 | + if ($this->verification) { |
|
| 267 | + $fpOut = fopen("php://stdout", $write_mode); |
|
| 268 | + } else { |
|
| 269 | + $fpOut = fopen($this->get_xcloner_path().$dest, $write_mode); |
|
| 270 | + } |
|
| 271 | 271 | |
| 272 | 272 | |
| 273 | 273 | if (!$fpOut) { |
| 274 | - //if (is_object($this->logger)) { |
|
| 275 | - $this->logger->error('Unable to write destination file for decryption'); |
|
| 276 | - //} |
|
| 277 | - throw new \Exception("Unable to write destination file for decryption"); |
|
| 278 | - } |
|
| 274 | + //if (is_object($this->logger)) { |
|
| 275 | + $this->logger->error('Unable to write destination file for decryption'); |
|
| 276 | + //} |
|
| 277 | + throw new \Exception("Unable to write destination file for decryption"); |
|
| 278 | + } |
|
| 279 | 279 | |
| 280 | 280 | |
| 281 | 281 | if (file_exists($this->get_xcloner_path().$source) && |