This commit is contained in:
2021-08-11 14:36:07 +08:00
parent bf8849aff8
commit 13f7b93659
3 changed files with 1 additions and 34 deletions
-2
View File
@@ -46,9 +46,7 @@ class Jwt extends Component
$jwt = Config::get('jwt', []);
if ($jwt) {
$this->setScene($jwt['scene'] ?? 'application');
$this->setEncrypt($jwt['encrypt'] ?? JWTConstant::AES_128_ECB);
$this->setKey($jwt['key'] ?? get_called_class());
$length = openssl_cipher_iv_length($this->encrypt);
if ($length > 0) {
$defaultIv = openssl_random_pseudo_bytes($length);