Heavier password encryption
I don't think this fixes actual bugs but the encryption seemed kinda weak.
This commit is contained in:
@@ -3,6 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Lidgren.Network;
|
||||
using Microsoft.Xna.Framework;
|
||||
using RestSharp;
|
||||
@@ -55,7 +56,7 @@ namespace Barotrauma.Networking
|
||||
name = name.Replace(";", "");
|
||||
|
||||
this.name = name;
|
||||
this.password = password;
|
||||
this.password = Encoding.UTF8.GetString(NetUtility.ComputeSHAHash(Encoding.UTF8.GetBytes(password)));
|
||||
|
||||
config = new NetPeerConfiguration("barotrauma");
|
||||
|
||||
@@ -1510,13 +1511,13 @@ namespace Barotrauma.Networking
|
||||
sender.ChatMessages.RemoveAt(0);
|
||||
}
|
||||
|
||||
if (sender.inGame || (Screen.Selected == GameMain.NetLobbyScreen))
|
||||
{
|
||||
if (sender.inGame || (Screen.Selected == GameMain.NetLobbyScreen))
|
||||
{
|
||||
AddChatMessage(message);
|
||||
}
|
||||
else
|
||||
{
|
||||
GameServer.Log(message.Text, message.Color);
|
||||
else
|
||||
{
|
||||
GameServer.Log(message.Text, message.Color);
|
||||
}
|
||||
sender.ChatSpamSpeed += 5.0f;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user