Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Don't run keystore encryption in coroutine
Browse files Browse the repository at this point in the history
Maybe it will fix it?
Uncaught exception
javax.crypto.IllegalBlockSizeException
...
Caused by: android.security.KeyStoreException: Key user not authenticated
  • Loading branch information
M3DZIK committed Mar 2, 2024
1 parent 63ed2ba commit 0e1fd79
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ fun VaultScreen(
deviceAuthentication = true
),
onAuthenticationSucceeded = { cipher ->
scope.launch(Dispatchers.IO) {
val encryptedData = KeyStore.encrypt(cipher, viewModel.vault.aesKey)
val encryptedData = KeyStore.encrypt(cipher, viewModel.vault.aesKey)

scope.launch(Dispatchers.IO) {
viewModel.credentialRepository.update(
credentials.copy(
biometricReSetup = false,
Expand Down

0 comments on commit 0e1fd79

Please sign in to comment.