AndroidKeystoreEncryptionKeyFactory

Low-level factory that generates and registers RSA encryption key pairs in the Android Keystore.

Most callers should use AndroidKeyStoreEncryptionKey.getOrCreateInstance instead, which wraps this factory and handles existence checks automatically.

Functions

Link copied to clipboard
fun create(algorithm: EncryptionAlgorithm, keyId: String, keySizeInBits: Int = 2048, strongBoxPreference: SecureHardwarePreference = SecureHardwarePreference.None)

Generates a new RSA key pair for algorithm and stores it in the Android Keystore under the alias keyId.