This commit is contained in:
2021-08-11 14:10:36 +08:00
parent b55d8fedce
commit ffc9c15324
2 changed files with 2 additions and 2 deletions
@@ -2,7 +2,7 @@
namespace Kiri\Jwt;
class ASE
class JWTConstant
{
const AES_128_ECB = 'aes-128-ecb';
+1 -1
View File
@@ -46,7 +46,7 @@ class Jwt extends Component
$jwt = Config::get('jwt', []);
if ($jwt) {
$this->setScene($jwt['scene'] ?? 'application');
$this->setEncrypt($jwt['encrypt'] ?? ASE::AES_128_ECB);
$this->setEncrypt($jwt['encrypt'] ?? JWTConstant::AES_128_ECB);
$this->setKey($jwt['key'] ?? get_called_class());
$defaultIv = openssl_random_pseudo_bytes(openssl_cipher_iv_length($this->encrypt));