getInstance
fun getInstance(algorithm: EncryptionAlgorithm, keyId: String?): AndroidKeyStoreEncryptionKey?(source)
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.
This function never generates a new key. Use getOrCreateInstance to auto-create one.
Parameters
keyId
The Android Keystore alias to look up. When null, a library-managed default alias derived from algorithm is used.
fun getInstance(algorithm: EncryptionAlgorithm.Dir, keyId: String?): AndroidKeyStoreEncryptionKey?(source)
Deprecated (with error)
AndroidKeyStoreEncryptionKey does not support the Dir algorithm. Use a symmetric key provider instead.