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 PrefsDataStore over caller-supplied storage.

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

Canonical encrypted Preferences factory. Prefer PrefsStoreLocator.Platform from commonMain (Okio on file targets, localStorage on JS/Wasm). Path must end with .preferences_pb when resolved to file.

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

Okio Preferences path factory (encrypted). Requires a .preferences_pb suffix.

Link copied to clipboard

Canonical plain Preferences factory. Prefer PrefsStoreLocator.Platform from commonMain (Okio on file targets, localStorage on JS/Wasm).

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

Okio Preferences path factory (unencrypted). Requires a .preferences_pb suffix. Prefer PrefsStoreLocator.File / PrefsStoreLocator.Platform from shared code.

Link copied to clipboard

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

Link copied to clipboard

Validates that this Path ends with .preferences_pb, throwing IllegalArgumentException otherwise.