Package-level declarations

Functions

Link copied to clipboard
fun encryptedPreferencesDataStore(name: String, cipher: () -> Cipher, options: EncryptedStoreOptions.() -> Unit = {}, produceMigrations: (Context) -> List<DataMigration<Preferences>> = { emptyList() }, corruptionHandler: ReplaceFileCorruptionHandler<Preferences>? = null, registry: StoreRegistry? = null): ReadOnlyProperty<Context, DataStore<Preferences>>

Singleton encrypted Preferences DataStore (REQ-AND-02). File is stored as {name}.preferences_pb.

Link copied to clipboard
fun <T : Any> encryptedProtoDataStore(fileName: String, kSerializer: KSerializer<T>, defaultValue: T, cipher: () -> Cipher, options: EncryptedStoreOptions.() -> Unit = {}, produceMigrations: (Context) -> List<DataMigration<T>> = { emptyList() }, corruptionHandler: ReplaceFileCorruptionHandler<T>? = null, registry: StoreRegistry? = null): ReadOnlyProperty<Context, DataStore<T>>

Singleton encrypted proto DataStore per fileName (REQ-AND-01).

Link copied to clipboard
fun plainPreferencesDataStore(name: String, produceMigrations: (Context) -> List<DataMigration<Preferences>> = { emptyList() }, corruptionHandler: ReplaceFileCorruptionHandler<Preferences>? = null): ReadOnlyProperty<Context, DataStore<Preferences>>

Singleton plain Preferences DataStore (REQ-AND-03).