예제 #1
0
 private void BtnEncrypt_Click(object sender, EventArgs e)
 {
     fh = new FileHandler(TxtFileLocation.Text);
     foreach (string item in fh.Read())
     {
         TxtOriginal.Text += item + " ";
     }
     fh.Write(cipher.Encrypt(fh.Read()));
     foreach (string item in fh.Read())
     {
         TxtNew.Text += item + " ";
     }
 }
예제 #2
0
        public List <string> ToBinary(List <string> text)
        {
            List <string> temp = new List <string>();

            text = cipher.Encrypt(text);
            for (int i = 0; i < text.Count; i++)
            {
                string letters = string.Empty;
                for (int j = 0; j < text[i].Length; j++)
                {
                    letters += Convert.ToString(text[i][j], 2).PadLeft(8, '0');
                }
                temp.Add(letters);
            }
            return(temp);
        }