Storage
Local data is stored with ObjectBox 4.0.3. The store
module holds the entities, a factory that opens a BoxStore, and a Batch
helper for transactions. The sync engines, the outbox and the repositories
read and write through it.
val store: BoxStore = Factory.build(context.filesDir) // pro.aduki.store.box.Factory
Factory.create(dir) returns a BoxStoreBuilder for the directory;
Factory.build(dir) builds it.
Encryption
The database file as a whole is not encrypted: ObjectBox 4.0.3 has no encryption option, so the file relies on the platform (file-based encryption on Android). The SDK additionally seals every personal text column with AES-256-GCM (Vault): message subject, sender, recipients, preview and blob; contact name, e-mail, phone, company and vCard; appointment location and notes; mailbox and service names; the outbox payload. Ids, flags, timestamps, counters and roles stay in the clear so sync works; contact lookups use keyed blind indexes and free-text search runs in memory. Sealing is tested on a plain JVM and on the real Android Keystore of an API 34 emulator (software-backed); hardware backing is unverified.