mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Better message view for fingerprint problem #114
This commit is contained in:
@@ -149,10 +149,12 @@ class BiometricUnlockDatabaseHelper(private val context: FragmentActivity,
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
cipher?.init(Cipher.ENCRYPT_MODE, getSecretKey())
|
getSecretKey()?.let { secretKey ->
|
||||||
|
cipher?.init(Cipher.ENCRYPT_MODE, secretKey)
|
||||||
|
|
||||||
initBiometricPrompt()
|
initBiometricPrompt()
|
||||||
actionIfCypherInit.invoke(biometricPrompt, cryptoObject, promptInfoStoreCredential)
|
actionIfCypherInit.invoke(biometricPrompt, cryptoObject, promptInfoStoreCredential)
|
||||||
|
}
|
||||||
|
|
||||||
} catch (unrecoverableKeyException: UnrecoverableKeyException) {
|
} catch (unrecoverableKeyException: UnrecoverableKeyException) {
|
||||||
Log.e(TAG, "Unable to initialize encrypt data", unrecoverableKeyException)
|
Log.e(TAG, "Unable to initialize encrypt data", unrecoverableKeyException)
|
||||||
@@ -199,10 +201,13 @@ class BiometricUnlockDatabaseHelper(private val context: FragmentActivity,
|
|||||||
// important to restore spec here that was used for decryption
|
// important to restore spec here that was used for decryption
|
||||||
val iv = Base64.decode(ivSpecValue, Base64.NO_WRAP)
|
val iv = Base64.decode(ivSpecValue, Base64.NO_WRAP)
|
||||||
val spec = IvParameterSpec(iv)
|
val spec = IvParameterSpec(iv)
|
||||||
cipher?.init(Cipher.DECRYPT_MODE, getSecretKey(), spec)
|
|
||||||
|
|
||||||
initBiometricPrompt()
|
getSecretKey()?.let { secretKey ->
|
||||||
actionIfCypherInit.invoke(biometricPrompt, cryptoObject, promptInfoExtractCredential)
|
cipher?.init(Cipher.DECRYPT_MODE, secretKey, spec)
|
||||||
|
|
||||||
|
initBiometricPrompt()
|
||||||
|
actionIfCypherInit.invoke(biometricPrompt, cryptoObject, promptInfoExtractCredential)
|
||||||
|
}
|
||||||
|
|
||||||
} catch (unrecoverableKeyException: UnrecoverableKeyException) {
|
} catch (unrecoverableKeyException: UnrecoverableKeyException) {
|
||||||
Log.e(TAG, "Unable to initialize decrypt data", unrecoverableKeyException)
|
Log.e(TAG, "Unable to initialize decrypt data", unrecoverableKeyException)
|
||||||
|
|||||||
@@ -15,11 +15,13 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="24dp"
|
android:layout_marginStart="24dp"
|
||||||
android:layout_marginEnd="18dp"
|
android:layout_marginEnd="18dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
app:layout_constraintTop_toTopOf="@+id/biometric_delimiter"
|
app:layout_constraintTop_toTopOf="@+id/biometric_delimiter"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
|||||||
Reference in New Issue
Block a user