Fix timezone bug in request.php using MySQL DATE_ADD and clean up EncryptionHelper
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user