@@ -341,7 +341,9 @@ discard block |
||
| 341 | 341 | } |
| 342 | 342 | |
| 343 | 343 | $hash = $this->hasher->make($key); |
| 344 | - if($this->encrypt) $hash = Crypt::encrypt($hash); |
|
| 344 | + if($this->encrypt) { |
|
| 345 | + $hash = Crypt::encrypt($hash); |
|
| 346 | + } |
|
| 345 | 347 | |
| 346 | 348 | $this->session->put('captcha', [ |
| 347 | 349 | 'sensitive' => $this->sensitive, |
@@ -474,7 +476,9 @@ discard block |
||
| 474 | 476 | $value = $this->str->lower($value); |
| 475 | 477 | } |
| 476 | 478 | |
| 477 | - if($encrypt) $key = Crypt::decrypt($key); |
|
| 479 | + if($encrypt) { |
|
| 480 | + $key = Crypt::decrypt($key); |
|
| 481 | + } |
|
| 478 | 482 | $check = $this->hasher->check($value, $key); |
| 479 | 483 | // if verify pass,remove session |
| 480 | 484 | if ($check) { |
@@ -500,8 +504,12 @@ discard block |
||
| 500 | 504 | |
| 501 | 505 | $this->configure($config); |
| 502 | 506 | |
| 503 | - if(!$this->sensitive) $value = $this->str->lower($value); |
|
| 504 | - if($this->encrypt) $key = Crypt::decrypt($key); |
|
| 507 | + if(!$this->sensitive) { |
|
| 508 | + $value = $this->str->lower($value); |
|
| 509 | + } |
|
| 510 | + if($this->encrypt) { |
|
| 511 | + $key = Crypt::decrypt($key); |
|
| 512 | + } |
|
| 505 | 513 | return $this->hasher->check($value, $key); |
| 506 | 514 | } |
| 507 | 515 | |