added guardian login with views for their assigned childs
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
|
||||
import '../../../../utils/random_id.dart';
|
||||
|
||||
/// A stable, anonymous per-install identifier for telemetry. Generated once on
|
||||
/// first use (128 bits from a cryptographic RNG) and persisted in the secure
|
||||
/// keystore, so a device stays a single row across password rotations and FCM
|
||||
@@ -21,15 +21,9 @@ class TelemetryDeviceId {
|
||||
_cached = existing;
|
||||
return existing;
|
||||
}
|
||||
final generated = _generate();
|
||||
final generated = randomHexId();
|
||||
await _storage.write(key: _key, value: generated);
|
||||
_cached = generated;
|
||||
return generated;
|
||||
}
|
||||
|
||||
static String _generate() {
|
||||
final random = Random.secure();
|
||||
final bytes = List<int>.generate(16, (_) => random.nextInt(256));
|
||||
return bytes.map((b) => b.toRadixString(16).padLeft(2, '0')).join();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user