- 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;
- HashResetRequest(Utils->Creator, sha256).Send();
- hmac2 = HashSumRequest(Utils->Creator, sha256, hmac2).Send();
-
- HashResetRequest(Utils->Creator, sha256).Send();
- std::string hmac = hmac1 + hmac2;
- hmac = HashSumRequest(Utils->Creator, sha256, hmac).Send();
-
- 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!");