Initial V2 commit 4
This commit is contained in:
@@ -3,14 +3,15 @@
|
||||
namespace App\Services;
|
||||
|
||||
/**
|
||||
* Payload Crypto Service — AES-256-GCM
|
||||
* خدمة تشفير حمولة البيانات (Payload Crypto Service)
|
||||
*
|
||||
* Dynamic encryption for all payloads between Flutter apps and the API.
|
||||
* Unlike LegacyEncryption which uses static IV, this generates a unique IV per request.
|
||||
* الغرض من الملف:
|
||||
* تشفير وفك تشفير البيانات المتبادلة بين التطبيق (Flutter) والخادم (API) باستخدام تقنية AES-256-GCM.
|
||||
*
|
||||
* Format: base64(IV + ciphertext + tag)
|
||||
* - IV: 12 bytes (random per encryption)
|
||||
* - Tag: 16 bytes (integrity verification)
|
||||
* كيفية العمل:
|
||||
* 1. يولد مفتاح تشفير ديناميكي وفريد لكل طلب (IV).
|
||||
* 2. يضمن خصوصية البيانات (تشفير) وسلامتها (منع التلاعب عبر الـ Authentication Tag).
|
||||
* 3. يختلف عن التشفير القديم (Legacy) بأنه أكثر أماناً ويستخدم معايير تشفير حديثة.
|
||||
*/
|
||||
class PayloadCrypto
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user