From eb4d2333c73afa1782e80a0935e7d71edd1c3d8e Mon Sep 17 00:00:00 2001 From: dankito Date: Sat, 6 Nov 2021 16:16:35 +0100 Subject: [PATCH] Reduced Bcrypt cost to 6 as with 12 on my old phone decryption took 2,5 seconds --- .../banking/ui/android/authentication/AuthenticationService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/authentication/AuthenticationService.kt b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/authentication/AuthenticationService.kt index e31882d5..a95624f5 100644 --- a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/authentication/AuthenticationService.kt +++ b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/authentication/AuthenticationService.kt @@ -199,7 +199,7 @@ open class AuthenticationService( settings.salt = encodeToBase64(salt) if (newUserPassword != null) { - settings.hashedUserPassword = BCrypt.withDefaults().hashToString(12, newUserPassword) + settings.hashedUserPassword = BCrypt.withDefaults().hashToString(6, newUserPassword) newDatabasePassword = concatPasswords(newUserPassword, newDefaultPassword) } }