android-components / mozilla.components.concept.sync / LockableStore

LockableStore

interface LockableStore : SyncableStore (source)

An extension of SyncableStore that can be locked/unlocked using an encryption key.

Functions

Name Summary
unlocked abstract suspend fun <T> unlocked(encryptionKey: String, block: suspend (store: LockableStore) -> T): T
Executes a block while keeping the store in an unlocked state. Store is locked once block is finished.

Inherited Functions

Name Summary
getHandle abstract fun getHandle(): Long
This should be removed. See: https://github.com/mozilla/application-services/issues/1877

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.

Inheritors

Name Summary
SyncableLoginsStore data class SyncableLoginsStore : LockableStore
Wraps AsyncLoginsStorage instance along with a lazy encryption key.