PIN : fix quality

This commit is contained in:
ganfra 2023-10-26 15:25:40 +02:00
parent a7c83a94d3
commit ca6a30d6cc
49 changed files with 131 additions and 45 deletions

View file

@ -40,7 +40,9 @@ class KeyStoreSecretKeyProvider @Inject constructor() : SecretKeyProvider {
// False positive lint issue
@SuppressLint("WrongConstant")
override fun getOrCreateKey(alias: String): SecretKey {
val keyStore = KeyStore.getInstance(ANDROID_KEYSTORE).also { it.load(null) }
val keyStore = KeyStore.getInstance(ANDROID_KEYSTORE).apply {
load(null)
}
val secretKeyEntry = (keyStore.getEntry(alias, null) as? KeyStore.SecretKeyEntry)
?.secretKey
return if (secretKeyEntry == null) {