场景
使用异或算法进行数字加密效果
注:
博客主页:
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 { } } } }
Copyright © 2004-2024 Ynicp.com 版权所有 法律顾问:建纬(昆明)律师事务所 昆明市网翼通科技有限公司 滇ICP备08002592号-4