場景
使用異或演算法進行數字加密效果

注:
博客主頁:
https://blog.csdn.net/badao_liumang_qizhi
關注公眾號
霸道的程式猿
獲取編程相關電子書、教程推送與免費下載,
實作
新建一個Winform程式,設計表單頁面布局如下

然后需要添加的參考如下

修改其代碼為
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace YHEnData { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { try { if (textBox1.Text != "") { textBox2.Text = (Convert.ToInt32(textBox1.Text) ^ 123).ToString(); } } catch { } } private void button2_Click(object sender, EventArgs e) { try { if (textBox2.Text != "") { textBox1.Text = (Convert.ToInt32(textBox2.Text) ^ 123).ToString(); } } catch { } } } }
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/61596.html
標籤:C#
上一篇:C# 命名規則
下一篇:c# 執行windows模擬登錄
