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


interface LockableStore : SyncableStore (source)

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


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:

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.


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