From 5c7db14a557d7f980dfaa8c10d40c1ccc554b35d Mon Sep 17 00:00:00 2001 From: Daniel Vassdal Date: Wed, 2 Jul 2014 20:55:33 +0200 Subject: 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 --- src/modules/m_sqlauth.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/m_sqlauth.cpp') 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("hash/md5"); if (md5) - userinfo["md5pass"] = md5->hexsum(user->password); + userinfo["md5pass"] = md5->Generate(user->password); HashProvider* sha256 = ServerInstance->Modules->FindDataService("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; -- cgit v1.2.3