mirror of
https://github.com/anope/anope.git
synced 2026-07-02 12:33:13 +02:00
Start migrating to range-based for loops.
This commit is contained in:
@@ -20,8 +20,8 @@ class EBCRYPT : public Module
|
||||
Anope::string Salt()
|
||||
{
|
||||
char entropy[16];
|
||||
for (unsigned int i = 0; i < sizeof(entropy); i++)
|
||||
entropy[i] = static_cast<char>(rand() % 0xFF);
|
||||
for (auto &chr : entropy)
|
||||
chr = static_cast<char>(rand() % 0xFF);
|
||||
|
||||
char salt[32];
|
||||
if (!_crypt_gensalt_blowfish_rn("$2a$", rounds, entropy, sizeof(entropy), salt, sizeof(salt)))
|
||||
|
||||
Reference in New Issue
Block a user