android-components / mozilla.components.lib.dataprotect / KeyStoreWrapper

KeyStoreWrapper

open class KeyStoreWrapper (source)

Wraps the critical functions around a Java KeyStore to better facilitate testing and instrumenting.

Constructors

<init>

KeyStoreWrapper()

Wraps the critical functions around a Java KeyStore to better facilitate testing and instrumenting.

Functions

getKeyFor

open fun getKeyFor(label: String): Key?

Retrieves the SecretKey for the given label.

getKeyStore

fun getKeyStore(): KeyStore

Retrieves the underlying KeyStore, loading it if necessary.

loadKeyStore

open fun loadKeyStore(): KeyStore

Creates and initializes the KeyStore in use.

makeKeyFor

open fun makeKeyFor(label: String): SecretKey

Creates a SecretKey for the given label.

removeKeyFor

fun removeKeyFor(label: String): Unit

Deletes a key with the given label.