This commit is contained in:
2021-08-11 14:13:22 +08:00
parent ffc9c15324
commit 9371d47587
+2
View File
@@ -49,6 +49,8 @@ class Jwt extends Component
$this->setEncrypt($jwt['encrypt'] ?? JWTConstant::AES_128_ECB);
$this->setKey($jwt['key'] ?? get_called_class());
var_dump($this->encrypt);
$defaultIv = openssl_random_pseudo_bytes(openssl_cipher_iv_length($this->encrypt));
$this->setIv($jwt['iv'] ?? $defaultIv);
}