summaryrefslogtreecommitdiff
path: root/src/modules/m_sqlauth.cpp
diff options
context:
space:
mode:
authorDaniel Vassdal <shutter@canternet.org>2014-07-02 20:55:33 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-08-04 12:38:12 +0200
commit5c7db14a557d7f980dfaa8c10d40c1ccc554b35d (patch)
treed9d0b3161928f1ba9cbf0ced5f894c2d1c6a1886 /src/modules/m_sqlauth.cpp
parent0c0a7b6404c5de51241cdaa3eb159d014ef51024 (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.cpp4
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;