diff options
| author | 2024-08-27 15:17:11 +0100 | |
|---|---|---|
| committer | 2024-08-27 15:17:11 +0100 | |
| commit | 21fc51ab7c186d51ca215e297c43e8ca73ed5e4b (patch) | |
| tree | c265ea7816852524c2833d2ab02407d5d31f8d8f /src/modules/m_bcrypt.cpp | |
| parent | Fix the argument to BindPorts not being documented. (diff) | |
| download | inspircd++-21fc51ab7c186d51ca215e297c43e8ca73ed5e4b.tar.gz inspircd++-21fc51ab7c186d51ca215e297c43e8ca73ed5e4b.tar.bz2 inspircd++-21fc51ab7c186d51ca215e297c43e8ca73ed5e4b.zip | |
Use GenRandom instead of GenRandomInt to populate Bcrypt entropy.
Diffstat (limited to 'src/modules/m_bcrypt.cpp')
| -rw-r--r-- | src/modules/m_bcrypt.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/modules/m_bcrypt.cpp b/src/modules/m_bcrypt.cpp index 5f1cf5adb..39dd757c3 100644 --- a/src/modules/m_bcrypt.cpp +++ b/src/modules/m_bcrypt.cpp @@ -31,8 +31,7 @@ private: std::string Salt() { char entropy[16]; - for (char& chr : entropy) - chr = ServerInstance->GenRandomInt(0xFF); + ServerInstance->GenRandom(entropy, std::size(entropy)); char salt[32]; if (!_crypt_gensalt_blowfish_rn("$2a$", rounds, entropy, sizeof(entropy), salt, sizeof(salt))) |
