/// <summary> /// Generate the keys to identify the user and encrypt the network session /// </summary> public void GenKey(SessionSide side, Size size, int MazeCount, int MazeSteps) { if (side == SessionSide.Server) { MazeHandshake = new ServerMaze(size, MazeCount, MazeSteps); } else { MazeHandshake = new ClientMaze(size, MazeCount, MazeSteps); } MazeHandshake.SetLoginData(Username, Password, PrivateKeys, PublicKey); MazeHandshake.SetMazeKey(); //encrypt the public key with WopEx EncryptedPublicKey = MazeHandshake.GetEncryptedPublicKey(); EncryptedHash = BitConverter.ToString(SHA512Managed.Create().ComputeHash(EncryptedPublicKey, 0, EncryptedPublicKey.Length)).Replace("-", ""); }
/// <summary> /// Generate the keys to identify the user and encrypt the network session /// </summary> public void GenKey(SessionSide side, Size size, int MazeCount, int MazeSteps) { if(side == SessionSide.Server) MazeHandshake = new ServerMaze(size, MazeCount, MazeSteps); else MazeHandshake = new ClientMaze(size, MazeCount, MazeSteps); MazeHandshake.SetLoginData(Username, Password, PrivateKeys, PublicKey); MazeHandshake.SetMazeKey(); //encrypt the public key with WopEx EncryptedPublicKey = MazeHandshake.GetEncryptedPublicKey(); EncryptedHash = BitConverter.ToString(SHA512Managed.Create().ComputeHash(EncryptedPublicKey, 0, EncryptedPublicKey.Length)).Replace("-", ""); }
/// <summary> /// Generate the keys to identify the user and encrypt the network session /// </summary> public void GenKey(SSPClient Client, SessionSide side, Size size, int MazeCount, int MazeSteps) { this.Client = Client; GenKey(side, size, MazeCount, MazeSteps); }