Companion

Functions

Link copied to clipboard

Returns an AndroidKeyStoreEncryptionKey for the given algorithm and keyId if a matching key already exists in the Android Keystore, or null if no such key is found.

Link copied to clipboard
fun getOrCreateInstance(algorithm: EncryptionAlgorithm, keyId: String?, keySizeInBits: Int = 2048, strongBoxPreference: SecureHardwarePreference = SecureHardwarePreference.Preferred): AndroidKeyStoreEncryptionKey

Returns an AndroidKeyStoreEncryptionKey for the given algorithm and keyId, generating a new RSA key pair in the Android Keystore if one does not already exist.

fun getOrCreateInstance(algorithm: EncryptionAlgorithm.Dir, keyId: String?, keySizeInBits: Int = 2048, strongBoxPreference: SecureHardwarePreference = SecureHardwarePreference.None): AndroidKeyStoreEncryptionKey