Esempio n. 1
0
            public void GenServerKey()
            {
                ServerHandshake = new ServerMaze(new System.Drawing.Size(128, 128), 1, 5);

                Console.WriteLine("[Server] Setting up login data for user, ");// + Username);
                ServerHandshake.SetLoginData(Username, Password, PrivateKeys, PublicKey);
                Console.WriteLine("[Server] Generating key for user, ");// + Username);
                ServerHandshake.SetMazeKey();

                //encrypt the public key with WopEx
                EncryptedPublicKey = ServerHandshake.GetEncryptedPublicKey(); //encrypt the public key
                EncryptedHash = BitConverter.ToString(SHA512Managed.Create().ComputeHash(EncryptedPublicKey, 0, EncryptedPublicKey.Length)).Replace("-", "");
            }
            public void GenServerKey()
            {
                ServerHandshake = new ServerMaze(new System.Drawing.Size(512, 512), 10, 30);
                ServerHandshake.SetLoginData(Username, Password, PrivateKeys, PublicKey);
                ServerHandshake.SetMazeKey();

                //encrypt the public key with WopEx
                EncryptedPublicKey = ServerHandshake.GetEncryptedPublicKey(); //encrypt the public key
                EncryptedHash = BitConverter.ToString(SHA512Managed.Create().ComputeHash(EncryptedPublicKey, 0, EncryptedPublicKey.Length)).Replace("-", "");
            }