mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-12-06 00:32:32 -08:00
Change order keyfile recognition
This commit is contained in:
1 parent
97d4972f9a
commit
9ef4695cc7
1 file changed
+5
-5
+5
-5
@@ -129,17 +129,17 @@ abstract class DatabaseVersioned<
|
||||
|
||||
val keyData = keyInputStream.readBytes()
|
||||
|
||||
// Check 32 bits key file
|
||||
if (keyData.size == 32) {
|
||||
return keyData
|
||||
}
|
||||
|
||||
// Check XML key file
|
||||
val xmlKeyByteArray = loadXmlKeyFile(ByteArrayInputStream(keyData))
|
||||
if (xmlKeyByteArray != null) {
|
||||
return xmlKeyByteArray
|
||||
}
|
||||
|
||||
// Check 32 bits key file
|
||||
if (keyData.size == 32) {
|
||||
return keyData
|
||||
}
|
||||
|
||||
// Hash file as binary data
|
||||
try {
|
||||
return MessageDigest.getInstance("SHA-256").digest(keyData)
|
||||
|
||||
Reference in new issue
Block a user