- for (size_t n = 0; n < password.length(); n++)
- {
- hmac1 += static_cast<char>(password[n] ^ 0x5C);
- hmac2 += static_cast<char>(password[n] ^ 0x36);
- }
-
- hmac2 += challenge;
- hmac2 = HashRequest(Utils->Creator, sha256, hmac2).hex();
-
- std::string hmac = hmac1 + hmac2;
- hmac = HashRequest(Utils->Creator, sha256, hmac).hex();
-
- return "HMAC-SHA256:"+ hmac;
- }
- else if (!challenge.empty() && !sha256)
- ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"Not authenticating to server using SHA256/HMAC because we don't have m_sha256 loaded!");
+ if (!challenge.empty() && !sha256)
+ ServerInstance->Logs->Log("m_spanningtree",LOG_DEFAULT,"Not authenticating to server using SHA256/HMAC because we don't have m_sha256 loaded!");