sinew_security library
FieldCipher and BiometricVault on vetted crypto per platform.
Classes
- BiometricFailed
- Nothing was stored, or the secret wasn't released, because of reason.
- BiometricStore
- The outcome of BiometricVault.store: Stored or BiometricFailed.
- BiometricUnlock
- The outcome of BiometricVault.unlock: Unlocked or BiometricFailed.
- BiometricVault
- One small secret, typically the refresh token, that can be read only after a real biometric match. The secret is protected by the biometric key or access control, never by a prompt in front of a normal read, and enrolling a new face or fingerprint makes it unreadable.
- FieldCipher
-
Encrypts individual values (a name, a phone number) before they're stored,
with AES-256-GCM from
webcrypto: Google's BoringSSL on native platforms, the browser's Web Crypto on the web. - Stored
- The secret is stored.
- Unlocked
- A real biometric match released secret.
Enums
- BiometricAvailability
- Whether to offer biometrics.
- BiometricFailure
- Why BiometricVault.store or BiometricVault.unlock didn't complete. A user outcome, not an error.
Exceptions / Errors
- DecryptionFailed
-
A value couldn't be decrypted: it was changed, belongs to another context,
or its key is gone. The storage guard maps it to
LocalStorageCorruptionException; the caller treats the value as absent.