diff --git a/src/Security/Encryption/Encryption.php b/src/Security/Encryption/Encryption.php index cf6ad703..369653e4 100644 --- a/src/Security/Encryption/Encryption.php +++ b/src/Security/Encryption/Encryption.php @@ -92,7 +92,7 @@ public function __construct(protected ?object $config = null) */ public function encrypt(string $data, array|string|null $params = null): string { - return $this->encrypter()->encrypt($data, $params); + return base64_encode($this->encrypter()->encrypt($data, $params)); } /** @@ -100,7 +100,7 @@ public function encrypt(string $data, array|string|null $params = null): string */ public function decrypt(string $data, array|string|null $params = null): string { - return $this->encrypter()->decrypt($data, $params); + return $this->encrypter()->decrypt(base64_decode($data, true), $params); } /**