Пример #1
0
        /// <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("-", "");
        }
Пример #2
0
        /// <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("-", "");
        }
Пример #3
0
 /// <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);
 }
Пример #4
0
 /// <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);
 }