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

Name Summary
<init> KeyStoreWrapper()
Wraps the critical functions around a Java KeyStore to better facilitate testing and instrumenting.

Functions

Name Summary
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.

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.