Package-level declarations

Properties

Link copied to clipboard

AndroidX Preferences DataStore requires the .preferences_pb file extension (REQ-STO-07).

Functions

Link copied to clipboard
fun createEncryptedPreferencesDataStore(storage: Storage<Preferences>, migrations: List<DataMigration<Preferences>> = emptyList(), corruptionHandler: ReplaceFileCorruptionHandler<Preferences>? = null, registry: StoreRegistry? = null): DataStore<Preferences>

Encrypted Preferences DataStore over caller-supplied storage.

fun createEncryptedPreferencesDataStore(cipher: Cipher, producePath: () -> Path, options: EncryptedStoreOptions = EncryptedStoreOptions(), migrations: List<DataMigration<Preferences>> = emptyList(), corruptionHandler: ReplaceFileCorruptionHandler<Preferences>? = null, registry: StoreRegistry? = null): DataStore<Preferences>

File-backed encrypted Preferences DataStore (Okio). Path must end with .preferences_pb.

expect fun createEncryptedPreferencesDataStoreLocalStorage(cipher: Cipher, name: String, options: EncryptedStoreOptions = EncryptedStoreOptions().apply { storeName = name }, migrations: List<DataMigration<Preferences>> = emptyList()): DataStore<Preferences>

Web encrypted prefs → localStorage.

actual fun createEncryptedPreferencesDataStoreLocalStorage(cipher: ERROR CLASS: Symbol not found for Cipher, name: String, options: ERROR CLASS: Symbol not found for EncryptedStoreOptions, migrations: List<ERROR CLASS: Symbol not found for DataMigration<ERROR CLASS: Symbol not found for Preferences>>): ERROR CLASS: Symbol not found for DataStore<ERROR CLASS: Symbol not found for Preferences>

Web encrypted prefs → localStorage.

Link copied to clipboard
fun createPlainPreferencesDataStore(producePath: () -> Path, migrations: List<DataMigration<Preferences>> = emptyList(), corruptionHandler: ReplaceFileCorruptionHandler<Preferences>? = null): DataStore<Preferences>

Plain (unencrypted) Preferences DataStore on a file path. Path must end with .preferences_pb. Readable without a Cipher.

Web plain prefs → localStorage.

actual fun createPlainPreferencesDataStoreLocalStorage(name: String, migrations: List<ERROR CLASS: Symbol not found for DataMigration<ERROR CLASS: Symbol not found for Preferences>>): ERROR CLASS: Symbol not found for DataStore<ERROR CLASS: Symbol not found for Preferences>

Web plain prefs → localStorage.

Link copied to clipboard

Builds an EncryptedPreferencesSerializer for custom Storage (e.g. WebLocalStorage).

Link copied to clipboard