Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/format/KeePass2.cpp')
-rw-r--r--src/format/KeePass2.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/format/KeePass2.cpp b/src/format/KeePass2.cpp
index f89e828a1..88286a051 100644
--- a/src/format/KeePass2.cpp
+++ b/src/format/KeePass2.cpp
@@ -89,7 +89,8 @@ QSharedPointer<Kdf> KeePass2::uuidToKdf(const Uuid& uuid)
{
if (uuid == KDF_AES) {
return QSharedPointer<AesKdf>::create();
- } else if (uuid == KDF_ARGON2) {
+ }
+ if (uuid == KDF_ARGON2) {
return QSharedPointer<Argon2Kdf>::create();
}
@@ -100,13 +101,13 @@ QSharedPointer<Kdf> KeePass2::uuidToKdf(const Uuid& uuid)
KeePass2::ProtectedStreamAlgo KeePass2::idToProtectedStreamAlgo(quint32 id)
{
switch (id) {
- case static_cast<quint32>(KeePass2::ArcFourVariant):
- return KeePass2::ArcFourVariant;
- case static_cast<quint32>(KeePass2::Salsa20):
- return KeePass2::Salsa20;
- case static_cast<quint32>(KeePass2::ChaCha20):
- return KeePass2::ChaCha20;
+ case static_cast<quint32>(KeePass2::ProtectedStreamAlgo::ArcFourVariant):
+ return KeePass2::ProtectedStreamAlgo::ArcFourVariant;
+ case static_cast<quint32>(KeePass2::ProtectedStreamAlgo::Salsa20):
+ return KeePass2::ProtectedStreamAlgo::Salsa20;
+ case static_cast<quint32>(KeePass2::ProtectedStreamAlgo::ChaCha20):
+ return KeePass2::ProtectedStreamAlgo::ChaCha20;
default:
- return KeePass2::InvalidProtectedStreamAlgo;
+ return KeePass2::ProtectedStreamAlgo::InvalidProtectedStreamAlgo;
}
}