-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2083e7b
commit cf8c7c0
Showing
5 changed files
with
62 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
|
||
namespace JoyceZ\LaravelLib\Exceptions; | ||
|
||
/** | ||
* 解密异常 | ||
* Class DecryptErrorException | ||
* @package JoyceZ\LaravelLib\Exceptions | ||
*/ | ||
class DecryptErrorException extends \Exception | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
<?php | ||
|
||
|
||
namespace JoyceZ\LaravelLib\Aop; | ||
namespace JoyceZ\LaravelLib\Security; | ||
|
||
|
||
use Illuminate\Support\Str; | ||
|
||
/** | ||
* 密码操作 | ||
* Class AopPassword | ||
* @author joyecZhang <[email protected]> | ||
* @package JoyceZ\LaravelLib\Aop | ||
* @package JoyceZ\LaravelLib\Security | ||
*/ | ||
class AopPassword | ||
{ | ||
|
@@ -21,7 +20,7 @@ class AopPassword | |
* @param string $salt 加密盐 | ||
* @return $this | ||
*/ | ||
public function withSalt(string $salt='') | ||
public function withSalt(string $salt = '') | ||
{ | ||
$this->salt = trim($salt) == '' ? config('landao.passport.password_salt') : $salt; | ||
return $this; | ||
|
@@ -51,4 +50,4 @@ public function check(string $dbPassword, string $password, string $salt) | |
{ | ||
return $this->encrypt($password, $salt) == $dbPassword ? true : false; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters