Add supports for salted hashes to znc.conf

These changes the format of the 'Pass' config option. The old format is
still accepted. The new format is:

  Pass = plain#<plain text password>
  Pass = md5#<password hash>
  Pass = md5#<hash of password with salt appended>#<salt>#

This also makes ZNC only write configs in the new format.

znc --makeconf and znc --makepass now always generate salted hashes.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1127 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2008-07-13 15:32:27 +00:00
parent ac2caa0f22
commit bf2bd39769
6 changed files with 87 additions and 9 deletions
+3 -2
View File
@@ -193,9 +193,10 @@ int main(int argc, char** argv) {
#endif /* HAVE_LIBSSL */
if (bMakePass) {
CString sHash = CUtils::GetHashPass();
CString sSalt;
CString sHash = CUtils::GetSaltedHashPass(sSalt);
CUtils::PrintMessage("Use this in the <User> section of your config:");
CUtils::PrintMessage("Pass = " + sHash + " -");
CUtils::PrintMessage("Pass = md5#" + sHash + "#" + sSalt + "#");
return 0;
}