From 732ddd5b2b54d8337280fd941674b26422f5bfbd Mon Sep 17 00:00:00 2001 From: dankito Date: Sat, 17 Oct 2020 23:47:33 +0200 Subject: [PATCH] Reduced iterationCount as 65536 iterations took way to long (4 - 5 seconds) on normal Androids --- .../dankito/banking/ui/android/security/CryptographyManager.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/security/CryptographyManager.kt b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/security/CryptographyManager.kt index b99f5f55..90939747 100644 --- a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/security/CryptographyManager.kt +++ b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/security/CryptographyManager.kt @@ -108,7 +108,7 @@ open class CryptographyManager { protected open fun generatePbeSecretKey(userPassword: String, salt: ByteArray): SecretKey { // Initialize PBE with password val factory = SecretKeyFactory.getInstance(findBestPbeAlgorithm()!!) - val spec = PBEKeySpec(userPassword.toCharArray(), salt, 65536, 256) + val spec = PBEKeySpec(userPassword.toCharArray(), salt, 4096, 256) val key = factory.generateSecret(spec) return SecretKeySpec(key.encoded, "AES")