aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_pbkdf2.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-01-24 23:41:50 +0000
committerGravatar Sadie Powell2023-01-25 00:39:27 +0000
commitaf8effe4f0876d6fa934806745712f679bd36278 (patch)
treeb0d6de94d60dc5e116faa5e14b6029fb1c527886 /src/modules/m_pbkdf2.cpp
parentFix using (unsigned) long instead of (s)size_t. (diff)
Replace getInt/getUInt/getFloat with type safe templated functions.
Diffstat (limited to 'src/modules/m_pbkdf2.cpp')
-rw-r--r--src/modules/m_pbkdf2.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_pbkdf2.cpp b/src/modules/m_pbkdf2.cpp
index fbeb52e3b..53afb0ed3 100644
--- a/src/modules/m_pbkdf2.cpp
+++ b/src/modules/m_pbkdf2.cpp
@@ -185,8 +185,8 @@ class ModulePBKDF2 final
// First set the common values
const auto& tag = ServerInstance->Config->ConfValue("pbkdf2");
ProviderConfig newglobal;
- newglobal.iterations = tag->getUInt("iterations", 12288, 1);
- newglobal.dkey_length = tag->getUInt("length", 32, 1, 1024);
+ newglobal.iterations = tag->getNum<unsigned long>("iterations", 12288, 1);
+ newglobal.dkey_length = tag->getNum<size_t>("length", 32, 1, 1024);
// Then the specific values
ProviderConfigMap newconfigs;
@@ -195,8 +195,8 @@ class ModulePBKDF2 final
std::string hash_name = "hash/" + ptag->getString("hash");
ProviderConfig& config = newconfigs[hash_name];
- config.iterations = ptag->getUInt("iterations", newglobal.iterations, 1);
- config.dkey_length = ptag->getUInt("length", newglobal.dkey_length, 1, 1024);
+ config.iterations = ptag->getNum<unsigned long>("iterations", newglobal.iterations, 1);
+ config.dkey_length = ptag->getNum<size_t>("length", newglobal.dkey_length, 1, 1024);
}
// Config is valid, apply it