[edit] base64_encode
This commit is contained in:
parent
82ecdc8686
commit
da6a6328c9
@ -30,7 +30,7 @@ class BvBeJHandle
|
|||||||
*/
|
*/
|
||||||
public function AesEncrypt(string $data, string $key, string $vi): string|false
|
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
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user