From 13f7b93659fb9d5fd06d99b3f81abfb885dc6f03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 11 Aug 2021 14:36:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Jwt/JWTConstant.php | 31 ------------------------------- System/Jwt/Jwt.php | 2 -- System/Jwt/JwtHelper.php | 2 +- 3 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 System/Jwt/JWTConstant.php diff --git a/System/Jwt/JWTConstant.php b/System/Jwt/JWTConstant.php deleted file mode 100644 index 97fabba1..00000000 --- a/System/Jwt/JWTConstant.php +++ /dev/null @@ -1,31 +0,0 @@ -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); diff --git a/System/Jwt/JwtHelper.php b/System/Jwt/JwtHelper.php index ea8862fc..306fef6b 100644 --- a/System/Jwt/JwtHelper.php +++ b/System/Jwt/JwtHelper.php @@ -26,7 +26,7 @@ trait JwtHelper private string $scene = 'default'; - private string $encrypt = ''; + private string $encrypt = 'aes-128-ecb'; private string $iv = '';