Ejemplo n.º 1
0
        private void encryptButton_Click(object sender, EventArgs e)
        {
            string input    = inputField.Text;
            string password = passwordField.Text;

            byte[] encrypted = encryptor.Encrypt(input, password);
            outputField.Text = BitConverter.ToString(encrypted);
        }
 public void EncryptFile(string path, string key)
 {
     byte[] fileBytes = File.ReadAllBytes(path);
     File.WriteAllBytes(path, cryptoService.Encrypt(fileBytes, key));
 }