private void DisplayKeyPair() { var keyPair = PasswordSharing.GenerateKeyPair(); txtPublicKey.Text = keyPair.Item1; txtPrivateKey.Text = keyPair.Item2; }
private void GetUserInput(bool encryption) { char[] key = txtKey.Text.ToCharArray(); char[] password = txtPassword.Text.ToCharArray(); if (key.Length > 0 && password.Length > 0) { char[] message = PasswordSharing.ConvertUserInput(encryption, key, password); if (message.Length > 0) { txtPassword.Text = new string(message); Utilities.ZeroArray(message); } Utilities.ZeroArray(key); Utilities.ZeroArray(password); } else { DisplayUserInputError(encryption); } }