progress on validation

This commit is contained in:
Sem van der Hoeven
2020-09-30 16:22:57 +02:00
parent 97f9d863aa
commit 3e5f6e46c4
9 changed files with 139 additions and 3 deletions

View File

@@ -158,7 +158,11 @@ namespace Client
Console.WriteLine("enter password");
string password = Console.ReadLine();
byte[] message = DataParser.getJsonMessage(DataParser.GetLoginJson(username, password));
string hashUser = Hashing.Hasher.Encrypt(username);
string hashPassword = Hashing.Hasher.Encrypt(password);
Console.WriteLine("hashed to " + hashUser + " " + hashPassword);
byte[] message = DataParser.getJsonMessage(DataParser.GetLoginJson(hashUser, hashPassword));
initEngine();
this.stream.BeginWrite(message, 0, message.Length, new AsyncCallback(OnWrite), null);

View File

@@ -15,4 +15,6 @@
<ProjectReference Include="..\RH-Engine\RH-Engine.csproj" />
</ItemGroup>
<Import Project="..\Hashing\Hashing.projitems" Label="Shared" />
</Project>

View File

@@ -2,6 +2,8 @@
using Hardware;
using Hardware.Simulators;
using RH_Engine;
using System.Security.Cryptography;
using System.Text;
namespace Client
{
@@ -12,7 +14,6 @@ namespace Client
Console.WriteLine("Hello World!");
//connect fiets?
Client client = new Client();