CH-J SM Mobileمدیریت سرور از طریق SSH
منو
منبع منتشرشده

CH-J SM Mobile

پوشه‌ها و فایل‌های یک نسخهٔ مشخص از برنامه را مرور کنید.

دانلود ZIP منبع
CH-J / SM Mobile 175 فایل
sm-mobile-20261016T185235Z-8e93ecc1b59a افزوده‌شده: · ساخته‌شده:
secure_store.dart افزوده‌شده: تاریخ ثبت نشده است ۲٫۷ KB · 76 خط
کد دانلود فایل
1import 'package:flutter_secure_storage/flutter_secure_storage.dart';
3abstract interface class SecureStore {
4 Future<String?> read(String key);
5 Future<void> write(String key, String value);
6 Future<void> delete(String key);
7}
9class DeviceStore implements SecureStore {
10 final FlutterSecureStorage storage;
11 const DeviceStore(this.storage);
12 static const normal = DeviceStore(
13 FlutterSecureStorage(
14 aOptions: AndroidOptions(
15 resetOnError: false,
16 storageNamespace: 'sm_mobile',
17 ),
18 iOptions: IOSOptions(
19 accountName: 'eu.chj.smMobile',
20 accessibility: KeychainAccessibility.unlocked_this_device,
21 synchronizable: false,
22 ),
23 ),
24 );
26 /// The Vault data key, released only after a strong biometric check of
27 /// the currently enrolled biometrics. There is deliberately no device
28 /// passcode fallback: without biometrics the master password is needed.
29 /// The system invalidates the key when biometrics are added or removed.
30 static DeviceStore biometric(String title, {String negative = 'Cancel'}) =>
31 DeviceStore(
32 FlutterSecureStorage(
33 aOptions: AndroidOptions.biometric(
34 resetOnError: false,
35 enforceBiometrics: true,
36 requireBiometricsPerOperation: true,
37 biometricType: AndroidBiometricType.strongBiometricOnly,
38 storageNamespace: 'sm_mobile_biometric_v2',
39 biometricPromptTitle: title,
40 biometricPromptNegativeButton: negative,
41 ),
42 iOptions: const IOSOptions(
43 accountName: 'eu.chj.smMobile.biometric.v2',
44 accessibility: KeychainAccessibility.passcode,
45 synchronizable: false,
46 accessControlFlags: [AccessControlFlag.biometryCurrentSet],
47 ),
48 ),
49 );
51 /// Version 1 storage, which also accepted the device passcode. Only
52 /// deleted, never read.
53 static DeviceStore legacyBiometric() => const DeviceStore(
54 FlutterSecureStorage(
55 aOptions: AndroidOptions.biometric(
56 resetOnError: false,
57 enforceBiometrics: true,
58 requireBiometricsPerOperation: true,
59 storageNamespace: 'sm_mobile_biometric',
60 ),
61 iOptions: IOSOptions(
62 accountName: 'eu.chj.smMobile.biometric',
63 accessibility: KeychainAccessibility.passcode,
64 synchronizable: false,
65 accessControlFlags: [AccessControlFlag.userPresence],
66 ),
67 ),
68 );
69 @override
70 Future<String?> read(String key) => storage.read(key: key);
71 @override
72 Future<void> write(String key, String value) =>
73 storage.write(key: key, value: value);
74 @override
75 Future<void> delete(String key) => storage.delete(key: key);
SHA-25628e3128d2802358fd3cdbd0a3664836a01bae03a97b0e95e52fdd5e483ddb521

CH-J Proprietary Software License 1.14 · کد منبع تحت CH-J Proprietary Software License 1.14 ارائه می‌شود. در دسترس بودن آن شرایط مجوز را تغییر نمی‌دهد و حق اضافه‌ای اعطا نمی‌کند.

SHA-256 بایگانی46e427a43e87af091004f36145590bda8fe90086dfb0f631afeb5029fb0b5655
فایل‌ها