Fix timezone bug in request.php using MySQL DATE_ADD and clean up EncryptionHelper

This commit is contained in:
Hamza-Ayed
2026-06-24 23:03:45 +03:00
parent 12dfb25629
commit 7b0283473e
2 changed files with 10 additions and 26 deletions

View File

@@ -34,15 +34,6 @@ class EncryptionHelper
return self::PREFIX_GCM . base64_encode($iv . $tag . $encrypted);
}
// ─── تشفير نص باستخدام AES-256-CBC الحتمي ──
public function encryptDataDeterministic(string $plainText): string
{
$plainText = mb_convert_encoding($plainText, 'UTF-8');
$padded = $this->addPadding($plainText);
$encrypted = openssl_encrypt($padded, self::ALGO_CBC, $this->key, OPENSSL_RAW_DATA, $this->cbcIv);
return base64_encode($encrypted);
}
// ─── فك تشفير نص (يدعم CBC والـ GCM المستقبلي) ───────────
public function decryptData(string $cipherText): string|false
{