Example #1
0
        public void EncryptButton_Click(object sender, EventArgs e)
        {
            var    ob  = new RC6();
            UInt32 key = UInt32.Parse(TextBoxKey.Text);

            ob.File    = System.Text.Encoding.Default.GetBytes(TextBoxOpenText.Text);          // Чтение шифруемых данных
            ob.FileLen = (uint)ob.File.Length;
            ob.Generator((UInt32)key);                                                         // формирование ключа
            ob.Encode();                                                                       // шифрование
            TextBoxCrypted.Text = System.Text.Encoding.Default.GetString(ob.Result.ToArray()); //Вывод на экран зашифрованных данных
        }