dart_secure library

Enums

AuthenticationStatus
BiometricAuthType
You can choose if you want to have a specific type of Biometric Authentication, some devices only show Strong and weak so it is highly recommended to choose Strong for better device adaption

Functions

biometricAuth({BiometricAuthType? biometricAuthType, bool biometricOnly = false, bool stickyAuth = false, bool sensitiveTransaction = false, bool userErrorDialogs = false, String message = "Authentication"}) Future<AuthenticationStatus>
Biometric User Authentication
hashEncrypt({required String plainText, required String keyIV}) String
Hashes the given plainText with a salt (keyIV) using SHA-256.
inAppDecrypt({required String cipherText, required String key}) String
Decrypts the given cipherText using the provided key. The key must be 32 characters or less. The cipherText should include both the encrypted data and the IV (separated by :).
inAppEncrypt({required String text, required String key}) String
Encrypts the given text using the provided key. The key must be 32 characters or less. If the key is shorter than 32 characters, it will be padded with #. Returns a base64-encoded string of the encrypted text.
symmetricDecryption({required String cipherText, required String key}) String
Decrypts the given cipherText using the provided key. The cipherText should include both the encrypted data and the IV (separated by :).
symmetricEncrypt({required String text, required String keyIV}) String
Encrypts the given text using the provided keyIV for Salsa20 encryption. Note: This is not a hashing method and is reversible.
tempLockUser(BuildContext context, {int time = 30, required Widget afterCountNavigateTo, String lockedPageMessage = "You are temporary locked"}) Future<Widget>
You can use this for locking down the user after multiple login attempt to prevent against DOS and BruteForce
userAuthMonitor({required Widget authenticatedUserPage, required Widget unAuthenticatedUserPage, String? adminUID, Widget? adminPage, List<String>? blockUID, Widget? userBlockedPage}) → dynamic