qmlfrontend/net_session.cpp
changeset 15919 d52f5d8e75e6
parent 15099 fb7a9b0119d3
equal deleted inserted replaced
15918:8a6a2d931bae 15919:d52f5d8e75e6
   338   if (m_passwordHash.isEmpty() || m_serverSalt.isEmpty()) return;
   338   if (m_passwordHash.isEmpty() || m_serverSalt.isEmpty()) return;
   339 
   339 
   340   QString hash =
   340   QString hash =
   341       QCryptographicHash::hash(m_clientSalt.toLatin1()
   341       QCryptographicHash::hash(m_clientSalt.toLatin1()
   342                                    .append(m_serverSalt.toLatin1())
   342                                    .append(m_serverSalt.toLatin1())
   343                                    .append(m_passwordHash)
   343                                    .append(m_passwordHash.toLatin1())
   344                                    .append(QByteArray::number(cProtocolVersion))
   344                                    .append(QByteArray::number(cProtocolVersion))
   345                                    .append("!hedgewars"),
   345                                    .append("!hedgewars"),
   346                                QCryptographicHash::Sha1)
   346                                QCryptographicHash::Sha1)
   347           .toHex();
   347           .toHex();
   348 
   348 
   349   m_serverHash =
   349   m_serverHash =
   350       QCryptographicHash::hash(m_serverSalt.toLatin1()
   350       QCryptographicHash::hash(m_serverSalt.toLatin1()
   351                                    .append(m_clientSalt.toLatin1())
   351                                    .append(m_clientSalt.toLatin1())
   352                                    .append(m_passwordHash)
   352                                    .append(m_passwordHash.toLatin1())
   353                                    .append(QByteArray::number(cProtocolVersion))
   353                                    .append(QByteArray::number(cProtocolVersion))
   354                                    .append("!hedgewars"),
   354                                    .append("!hedgewars"),
   355                                QCryptographicHash::Sha1)
   355                                QCryptographicHash::Sha1)
   356           .toHex();
   356           .toHex();
   357 
   357