feat: add admin page

This commit is contained in:
2026-08-07 03:09:59 +02:00
parent 2c734493cf
commit 1dd7e69aa8
19 changed files with 891 additions and 65 deletions
+11 -4
View File
@@ -5,13 +5,20 @@ import 'package:crypto/crypto.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
class PinLockService {
PinLockService({FlutterSecureStorage? storage})
: _storage = storage ?? const FlutterSecureStorage();
PinLockService({
FlutterSecureStorage? storage,
String saltKey = _defaultSaltKey,
String hashKey = _defaultHashKey,
}) : _storage = storage ?? const FlutterSecureStorage(),
_saltKey = saltKey,
_hashKey = hashKey;
static const _saltKey = 'pin_salt';
static const _hashKey = 'pin_hash';
static const _defaultSaltKey = 'pin_salt';
static const _defaultHashKey = 'pin_hash';
final FlutterSecureStorage _storage;
final String _saltKey;
final String _hashKey;
Future<bool> hasPin() async {
final hash = await _storage.read(key: _hashKey);