Security implementation

This commit is contained in:
Sardelka
2022-06-24 10:33:36 +08:00
parent 82e7cdd785
commit 82ab9237f5
16 changed files with 486 additions and 354 deletions

View File

@ -9,6 +9,7 @@ using GTA.Native;
using System.IO;
using System.Xml.Serialization;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
namespace RageCoop.Client
{
@ -197,6 +198,11 @@ namespace RageCoop.Client
{
Function.Call(Hash.SET_RADIO_TO_STATION_INDEX, index);
}
public static byte[] GetHash(this string inputString)
{
using (HashAlgorithm algorithm = SHA256.Create())
return algorithm.ComputeHash(Encoding.UTF8.GetBytes(inputString));
}
}
}