fix: PRF settings #2673

This commit is contained in:
J-Jamet committed 2026-08-31 11:48:54 +02:00
1 parent 4054d7d844
commit 1bbddb9f8e
5 files changed
+11 -14

No files matched your search

+3
View File
@@ -1,3 +1,6 @@
KeePassDX(4.5.2)
* Fix PRF settings #2673
KeePassDX(4.5.1)
* Fix Memory optimization #2666
* Fix OTP token not hidden by default #2665
+2 -2
View File
@@ -19,8 +19,8 @@ android {
applicationId = "com.kunzisoft.keepass"
minSdk = 19
targetSdk = 36
versionCode = 45100
versionName = "4.5.1"
versionCode = 45200
versionName = "4.5.2"
multiDexEnabled = true
testApplicationId = "com.kunzisoft.keepass.tests"
@@ -266,18 +266,10 @@ data class AuthenticationExtensionsPRFValues(
private const val SECOND = "second"
fun JSONObject.getAuthenticationExtensionsPRFValues(): AuthenticationExtensionsPRFValues {
val first = Base64Helper.b64Decode(getString(FIRST))
if (first.size != 32) {
throw IllegalArgumentException("PRF salt 'first' must be 32 bytes, but was ${first.size}")
}
val second = if (has(SECOND)) {
val secondDecoded = Base64Helper.b64Decode(getString(SECOND))
if (secondDecoded.size != 32) {
throw IllegalArgumentException("PRF salt 'second' must be 32 bytes, but was ${secondDecoded.size}")
}
secondDecoded
} else null
return AuthenticationExtensionsPRFValues(first, second)
return AuthenticationExtensionsPRFValues(
Base64Helper.b64Decode(getString(FIRST)),
if (has(SECOND)) Base64Helper.b64Decode(getString(SECOND)) else null
)
}
}
}
@@ -0,0 +1 @@
* Fix PRF settings #2673
@@ -0,0 +1 @@
* Correction des paramètres PRF #2673