private void comboBoxKey_SelectedIndexChanged(object sender, EventArgs e) { string tag = (string)this.comboBoxKey.SelectedItem; string keytext = this.keysSection.Keys[tag].Key; SSH2UserAuthKey key = SSH2UserAuthKey.FromBase64String(keytext); this.openSSHTextBox.Text = key.PublicPartInOpenSSHStyle() + " " + tag; }
private AuthMethod CheckPublickKey(String key, AuthMethod authMethod) { if (authMethod == AuthMethod.PublicKey) { if (string.IsNullOrEmpty(key)) { return(AuthMethod.Password); } this.Key = SSH2UserAuthKey.FromBase64String(key).toSECSHStyle(""); } return(authMethod); }
private void buttonGenerate_Click(object sender, EventArgs e) { PublicKeyAlgorithm algorithm; algorithm = this.algorithmBox.Text == "RSA" ? PublicKeyAlgorithm.RSA : PublicKeyAlgorithm.DSA; this.labelfingerprint.Hide(); this.labelpublicKey.Hide(); this.labelTag.Hide(); this.textBoxTag.Hide(); this.publicKeyBox.Hide(); this.fingerprintBox.Hide(); this.labelRandomness.Show(); this.progressBarGenerate.Show(); this._gotKey = false; this._key = null; this._OpenSSHstring = ""; KeyGenThread t = new KeyGenThread(this, algorithm, Int32.Parse(this.bitCountBox.Text)); this._mmhandler = t.OnMouseMove; this.progressBarGenerate.MouseMove += this._mmhandler; t.Start(); }
private void buttonGenerate_Click(object sender, EventArgs e) { PublicKeyAlgorithm algorithm; algorithm = this.algorithmBox.Text == "RSA" ? PublicKeyAlgorithm.RSA : PublicKeyAlgorithm.DSA; this.labelfingerprint.Hide(); this.labelpublicKey.Hide(); this.labelTag.Hide(); this.textBoxTag.Hide(); this.publicKeyBox.Hide(); this.fingerprintBox.Hide(); this.labelRandomness.Show(); this.progressBarGenerate.Show(); this._gotKey = false; this._key = null; this._OpenSSHstring = ""; KeyGenThread t = new KeyGenThread(this, algorithm, Int32.Parse(this.bitCountBox.Text)); this._mmhandler = t.OnMouseMove; this.progressBarGenerate.MouseMove += this._mmhandler; t.Start(); }
private void buttonCancel_Click(object sender, EventArgs e) { this._key = null; this.Close(); }
public void SetResultKey(SSH2UserAuthKey k) { this._key = k; }
private void buttonCancel_Click(object sender, EventArgs e) { this._key = null; this.Close(); }
public void SetResultKey(SSH2UserAuthKey k) { this._key = k; }