aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_pbkdf2.cpp
diff options
context:
space:
mode:
authorGravatar Dominic Hamon2021-05-30 20:37:54 +0100
committerGravatar GitHub2021-05-30 20:37:54 +0100
commit02340285c564a7e82105137192d46d554a6fce3a (patch)
tree696d1a6249841de62c3fed70310c2a347fc66732 /src/modules/m_pbkdf2.cpp
parentAdd a workaround for a bug in GitHub Actions. (diff)
Added -Wshorten-64-to-32 and fixed all warnings.
Diffstat (limited to 'src/modules/m_pbkdf2.cpp')
-rw-r--r--src/modules/m_pbkdf2.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/m_pbkdf2.cpp b/src/modules/m_pbkdf2.cpp
index c44f4b384..a7e781014 100644
--- a/src/modules/m_pbkdf2.cpp
+++ b/src/modules/m_pbkdf2.cpp
@@ -30,12 +30,12 @@
class PBKDF2Hash
{
public:
- unsigned int iterations;
- unsigned int length;
+ unsigned long iterations;
+ size_t length;
std::string salt;
std::string hash;
- PBKDF2Hash(unsigned int itr, unsigned int dkl, const std::string& slt, const std::string& hsh = "")
+ PBKDF2Hash(unsigned long itr, size_t dkl, const std::string& slt, const std::string& hsh = "")
: iterations(itr), length(dkl), salt(slt), hash(hsh)
{
}
@@ -76,10 +76,10 @@ class PBKDF2Provider : public HashProvider
{
public:
HashProvider* provider;
- unsigned int iterations;
- unsigned int dkey_length;
+ unsigned long iterations;
+ size_t dkey_length;
- std::string PBKDF2(const std::string& pass, const std::string& salt, unsigned int itr = 0, unsigned int dkl = 0)
+ std::string PBKDF2(const std::string& pass, const std::string& salt, unsigned long itr = 0, size_t dkl = 0)
{
size_t blocks = std::ceil((double)dkl / provider->out_size);