void BtFDecipherClick(object sender, EventArgs e) { string fi = txFIn.Text; string fo = txFOut.Text; byte[] key = GetBytes(txFKey.Text); Blowfish bl = new Blowfish(this); bl.InitBoxes(key); bl.Decipher(fi, fo); }
//--- void BtDecipherClick(object sender, EventArgs e) { if (txKey.Text.Length > 0 && txInput.Text.Length > 0) { byte[] key = GetBytes(txKey.Text).Clone() as byte[]; Blowfish bl = new Blowfish(key); byte[] plain = GetBytes(txInput.Text).Clone() as byte[]; txOutput.Text = GetString(bl.Decipher(plain)); } }