mirror of
https://github.com/znc/znc.git
synced 2026-07-03 00:11:59 +02:00
Fix modperl startup.
User.h and Utils.h should not depend on each other, and instead of name of default method need to have a function in CUtils, which hashes using default method (such function is in CUser now)
This commit is contained in:
@@ -33,6 +33,7 @@ public:
|
||||
|
||||
bool ParseConfig(CConfig* Config, CString& sError);
|
||||
|
||||
// TODO refactor this
|
||||
enum eHashType {
|
||||
HASH_NONE,
|
||||
HASH_MD5,
|
||||
@@ -43,6 +44,7 @@ public:
|
||||
|
||||
// If you change the default hash here and in HASH_DEFAULT,
|
||||
// don't forget CUtils::sDefaultHash!
|
||||
// TODO refactor this
|
||||
static CString SaltedHash(const CString& sPass, const CString& sSalt) {
|
||||
return CUtils::SaltedSHA256Hash(sPass, sSalt);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,10 @@ public:
|
||||
static void PrintAction(const CString& sMessage);
|
||||
static void PrintStatus(bool bSuccess, const CString& sMessage = "");
|
||||
|
||||
#ifndef SWIGPERL
|
||||
// TODO refactor this
|
||||
static const CString sDefaultHash;
|
||||
#endif
|
||||
|
||||
static CString GetSaltedHashPass(CString& sSalt);
|
||||
static CString GetSalt();
|
||||
|
||||
Reference in New Issue
Block a user