Secure Storage Adapter
Component Detail
Infrastructure
medium complexity
mobile
0
Dependencies
2
Dependents
0
Entities
0
Integrations
Description
Wraps platform keychain (iOS Keychain, Android Keystore) and Flutter Secure Storage to provide transparent encryption and decryption of all data written to the local SQLite database. Ensures cached personal and health-related data meets security and WCAG-adjacent privacy requirements at rest.
secure-storage-adapter
Responsibilities
- Encrypt database file key using platform secure enclave
- Provide read and write wrappers that transparently apply AES encryption
- Integrate with SQLCipher or drift encryption extension for full database encryption
- Handle key rotation when security credentials change (e.g., biometric re-enroll)
Interfaces
encryptDatabaseKey(String rawKey): Future<String>
getDatabaseKey(): Future<String>
rotateKey(String newKey): Future<void>
Relationships
Dependents (2)
Components that depend on this component