rework the whole connection garbage/custom servers, other cleanups/refactors

This commit is contained in:
Stanley Dimant
2022-06-27 01:19:45 +02:00
parent 404ba8e278
commit 61b178e2c0
12 changed files with 386 additions and 302 deletions

View File

@@ -2,6 +2,7 @@
using System.IO;
using System.Security.Cryptography;
using System.Text;
using Dalamud.Game.ClientState.Objects.SubKinds;
namespace MareSynchronos.Utils
{
@@ -24,5 +25,11 @@ namespace MareSynchronos.Utils
using SHA256CryptoServiceProvider cryptoProvider = new();
return BitConverter.ToString(cryptoProvider.ComputeHash(Encoding.UTF8.GetBytes(stringToHash))).Replace("-", "");
}
public static string GetHash256(PlayerCharacter character)
{
using SHA256CryptoServiceProvider cryptoProvider = new();
return BitConverter.ToString(cryptoProvider.ComputeHash(Encoding.UTF8.GetBytes(character.Name + character.HomeWorld.Id.ToString()))).Replace("-", "");
}
}
}