diff options
| author | 2014-07-02 20:55:33 +0200 | |
|---|---|---|
| committer | 2014-08-04 12:38:12 +0200 | |
| commit | 5c7db14a557d7f980dfaa8c10d40c1ccc554b35d (patch) | |
| tree | d9d0b3161928f1ba9cbf0ced5f894c2d1c6a1886 /src/modules/m_sqlauth.cpp | |
| parent | m_password_hash: Use out_size as HMAC-key length, as RFC2104 recommends (diff) | |
Hashing: Redo API
* Don't assume the printable output of hashes is hex
* Add virtual Compare() function, usable for KDFs like BCrypt
Some changes and bugfixes are by @attilamolnar, original PR #767
Diffstat (limited to 'src/modules/m_sqlauth.cpp')
| -rw-r--r-- | src/modules/m_sqlauth.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_sqlauth.cpp b/src/modules/m_sqlauth.cpp index 1ffb3305a..8a0b80ce1 100644 --- a/src/modules/m_sqlauth.cpp +++ b/src/modules/m_sqlauth.cpp @@ -124,11 +124,11 @@ class ModuleSQLAuth : public Module HashProvider* md5 = ServerInstance->Modules->FindDataService<HashProvider>("hash/md5"); if (md5) - userinfo["md5pass"] = md5->hexsum(user->password); + userinfo["md5pass"] = md5->Generate(user->password); HashProvider* sha256 = ServerInstance->Modules->FindDataService<HashProvider>("hash/sha256"); if (sha256) - userinfo["sha256pass"] = sha256->hexsum(user->password); + userinfo["sha256pass"] = sha256->Generate(user->password); const std::string certfp = SSLClientCert::GetFingerprint(&user->eh); userinfo["certfp"] = certfp; |
