diff --git a/src/Handles/BvBeJHandle.php b/src/Handles/BvBeJHandle.php index d168daa..ad08686 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 openssl_encrypt($data, 'AES-128-CBC', $key, OPENSSL_CIPHER_AES_128_CBC, $vi); + return $this->Base64UrlEncode(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($data, 'AES-128-CBC', $key, OPENSSL_CIPHER_AES_128_CBC, $vi); + return openssl_decrypt($this->Base64UrlDecode($data), 'AES-128-CBC', $key, OPENSSL_CIPHER_AES_128_CBC, $vi); } /**