getPrivateKey

suspend fun getPrivateKey(alias: String): PrivateKey?

Retrieves a private key from the Keystore on a background thread.

Return

The private key or null if not found. If the key was permanently invalidated (e.g., user changed biometrics/PIN), the key is deleted and null is returned.

Parameters

alias

The alias for the key.