Update: 2026-07-22 00:27:49
This commit is contained in:
@@ -119,7 +119,7 @@ class PhoneAuthHelper {
|
||||
var res = await CRUD()
|
||||
// this for register and login //
|
||||
.post(link: "${AppLink.server}/ride/firebase/addToken.php", payload: {
|
||||
'token': (box.read(BoxName.tokenFCM.toString())),
|
||||
'token': (box.read(BoxName.tokenFCM)),
|
||||
'passengerID': box.read(BoxName.passengerID).toString(),
|
||||
"fingerPrint": fingerPrint
|
||||
});
|
||||
|
||||
@@ -190,6 +190,15 @@ void showUpdateDialog(BuildContext context) {
|
||||
|
||||
class DeviceHelper {
|
||||
static Future<String> getDeviceFingerprint() async {
|
||||
// ── التحقق من وجود بصمة مخزّنة مسبقاً ──────────────────────
|
||||
// AES-GCM يستخدم IV عشوائي كل مرة، فالتشفير ينتج نتيجة مختلفة
|
||||
// حتى لو النص الأصلي نفسه. لذلك نخزّن البصمة المشفرة أول مرة
|
||||
// ونرجعها من التخزين في كل مرة بعدها لضمان الثبات.
|
||||
final String? cachedFp = box.read(BoxName.deviceFpEncrypted);
|
||||
if (cachedFp != null && cachedFp.isNotEmpty) {
|
||||
return cachedFp;
|
||||
}
|
||||
|
||||
final DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
|
||||
var deviceData;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user