From da6a6328c9c0af292193b1973f56dbf33e329229 Mon Sep 17 00:00:00 2001 From: bvbej Date: Tue, 11 Jan 2022 14:41:15 +0800 Subject: [PATCH] [edit] base64_encode --- src/Handles/BvBeJHandle.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Handles/BvBeJHandle.php b/src/Handles/BvBeJHandle.php index ad08686..5abbc8a 100644 --- a/src/Handles/BvBeJHandle.php +++ b/src/Handles/BvBeJHandle.php @@ -30,7 +30,7 @@ class BvBeJHandle */ public function AesEncrypt(string $data, string $key, string $vi): string|false { - return $this->Base64UrlEncode(openssl_encrypt($data, 'AES-128-CBC', $key, OPENSSL_CIPHER_AES_128_CBC, $vi)); + return base64_encode(openssl_encrypt($data, 'AES-128-CBC', $key, OPENSSL_CIPHER_AES_128_CBC, $vi)); } /** @@ -42,7 +42,7 @@ class BvBeJHandle */ public function AesDecrypt(string $data, string $key, string $vi): string|false { - return openssl_decrypt($this->Base64UrlDecode($data), 'AES-128-CBC', $key, OPENSSL_CIPHER_AES_128_CBC, $vi); + return openssl_decrypt(base64_decode($data), 'AES-128-CBC', $key, OPENSSL_CIPHER_AES_128_CBC, $vi); } /**