@@ -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, |
@@ -472,7 +474,9 @@ discard block |
||
472 | 474 | $value = $this->str->lower($value); |
473 | 475 | } |
474 | 476 | |
475 | - if($this->encrypt) $key = Crypt::decrypt($key); |
|
477 | + if($this->encrypt) { |
|
478 | + $key = Crypt::decrypt($key); |
|
479 | + } |
|
476 | 480 | $check = $this->hasher->check($value, $key); |
477 | 481 | // if verify pass,remove session |
478 | 482 | if ($check) { |
@@ -495,7 +499,9 @@ discard block |
||
495 | 499 | return false; |
496 | 500 | } |
497 | 501 | |
498 | - if($this->encrypt) $key = Crypt::decrypt($key); |
|
502 | + if($this->encrypt) { |
|
503 | + $key = Crypt::decrypt($key); |
|
504 | + } |
|
499 | 505 | return $this->hasher->check($value, $key); |
500 | 506 | } |
501 | 507 |