Beispiel #1
0
        void BtFEncipherClick(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.Encipher(fi, fo);
        }
Beispiel #2
0
 //---
 void BtEncipherClick(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[];
         byte[] tmp = FixBytes(plain);
         txOutput.Text = GetString(bl.Encipher(tmp));
     }
 }