From b866b8aa1f77c967bfebc1795180a2702c9c2efa Mon Sep 17 00:00:00 2001 From: Dimitri Sitchet Tomkeu Date: Fri, 21 Feb 2025 11:28:04 +0100 Subject: [PATCH 1/3] patch: conversion automatique de la sortie binaire du chiffrement --- src/Security/Encryption/Encryption.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Security/Encryption/Encryption.php b/src/Security/Encryption/Encryption.php index cf6ad703..ebfaf4a9 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), $params); } /** From 9f26d7ebf703f398588e8ddb67b15669285b971d Mon Sep 17 00:00:00 2001 From: Dimitri Sitchet Tomkeu Date: Fri, 21 Feb 2025 11:33:01 +0100 Subject: [PATCH 2/3] Merge branch 'devs' of https://github.com/blitz-php/framework into devs From 3319fa19fe5a727c91012f9b634c612b4b129e8a Mon Sep 17 00:00:00 2001 From: dimtrovich <37987162+dimtrovich@users.noreply.github.com> Date: Fri, 21 Feb 2025 11:55:38 +0000 Subject: [PATCH 3/3] Fix styling --- src/Security/Encryption/Encryption.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Security/Encryption/Encryption.php b/src/Security/Encryption/Encryption.php index ebfaf4a9..369653e4 100644 --- a/src/Security/Encryption/Encryption.php +++ b/src/Security/Encryption/Encryption.php @@ -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(base64_decode($data), $params); + return $this->encrypter()->decrypt(base64_decode($data, true), $params); } /**