Fix decryptData null type error and live analytics overflow
This commit is contained in:
@@ -44,8 +44,9 @@ class EncryptionHelper
|
||||
}
|
||||
|
||||
// ─── فك تشفير نص (يدعم CBC والـ GCM المستقبلي) ───────────
|
||||
public function decryptData(string $cipherText): string|false
|
||||
public function decryptData(?string $cipherText): string|false
|
||||
{
|
||||
if (empty($cipherText)) return '';
|
||||
// تحقق إن كان مشفر بالنظام الجديد
|
||||
if (str_starts_with($cipherText, self::PREFIX_GCM)) {
|
||||
$raw = base64_decode(substr($cipherText, strlen(self::PREFIX_GCM)), true);
|
||||
|
||||
Reference in New Issue
Block a user