diff options
| author | 2023-01-24 23:41:50 +0000 | |
|---|---|---|
| committer | 2023-01-25 00:39:27 +0000 | |
| commit | af8effe4f0876d6fa934806745712f679bd36278 (patch) | |
| tree | b0d6de94d60dc5e116faa5e14b6029fb1c527886 /src/modules/m_pbkdf2.cpp | |
| parent | Fix 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.cpp | 8 |
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 |
