diff options
| author | 2014-07-02 19:19:55 +0200 | |
|---|---|---|
| committer | 2014-08-04 12:20:41 +0200 | |
| commit | 0c0a7b6404c5de51241cdaa3eb159d014ef51024 (patch) | |
| tree | baf2764f2d833f6405f30d98c4324ec2810985b7 /src/modules | |
| parent | Remove InspIRCd::BindSocket() (diff) | |
m_password_hash: Use out_size as HMAC-key length, as RFC2104 recommends
"In any case the minimal recommended length for K is L bytes (as the hash output length)."
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/m_password_hash.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/m_password_hash.cpp b/src/modules/m_password_hash.cpp index 926ba5632..37effc79e 100644 --- a/src/modules/m_password_hash.cpp +++ b/src/modules/m_password_hash.cpp @@ -43,7 +43,7 @@ class CommandMkpasswd : public Command user->WriteNotice("Unknown hash type"); return; } - std::string salt = ServerInstance->GenRandomStr(6, false); + std::string salt = ServerInstance->GenRandomStr(hp->out_size, false); std::string target = hp->hmac(salt, stuff); std::string str = BinToBase64(salt) + "$" + BinToBase64(target, NULL, 0); |
