亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? form1.cs

?? 利用C#做的AES加密和解密的小程序
?? CS
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using Aes算法;
using System.Text;

namespace AesDemoWinApp
{
	public class Form1 : System.Windows.Forms.Form
	{
    private System.Windows.Forms.TextBox textBox1;
    private System.Windows.Forms.TextBox textBox2;
        private System.Windows.Forms.TextBox textBox3;
    private System.Windows.Forms.Button button1;
    private System.Windows.Forms.Button button2;
    private System.Windows.Forms.Label label1;
    private System.Windows.Forms.Label label2;
    private System.Windows.Forms.Label label3;
		
		private System.ComponentModel.Container components = null;
        private TextBox textBox4;
        private Button button3;
        private Label label5;
        private Label label4;


       private byte[] cipherText = new byte[16];//保存密文信息
       private byte[] passwdText = new byte[64]; //保存密鑰信息

  
		public Form1()
		{
			InitializeComponent();
		}

		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.textBox2 = new System.Windows.Forms.TextBox();
            this.textBox3 = new System.Windows.Forms.TextBox();
            this.button1 = new System.Windows.Forms.Button();
            this.button2 = new System.Windows.Forms.Button();
            this.label1 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.label4 = new System.Windows.Forms.Label();
            this.textBox4 = new System.Windows.Forms.TextBox();
            this.button3 = new System.Windows.Forms.Button();
            this.label5 = new System.Windows.Forms.Label();
            this.SuspendLayout();
            // 
            // textBox1
            // 
            this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.textBox1.Location = new System.Drawing.Point(234, 17);
            this.textBox1.MaxLength = 8;
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(134, 21);
            this.textBox1.TabIndex = 0;
            // 
            // textBox2
            // 
            this.textBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.textBox2.Location = new System.Drawing.Point(157, 117);
            this.textBox2.MaxLength = 8;
            this.textBox2.Name = "textBox2";
            this.textBox2.ReadOnly = true;
            this.textBox2.Size = new System.Drawing.Size(299, 21);
            this.textBox2.TabIndex = 1;
            // 
            // textBox3
            // 
            this.textBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.textBox3.Location = new System.Drawing.Point(157, 148);
            this.textBox3.MaxLength = 8;
            this.textBox3.Name = "textBox3";
            this.textBox3.ReadOnly = true;
            this.textBox3.Size = new System.Drawing.Size(299, 21);
            this.textBox3.TabIndex = 2;
            // 
            // button1
            // 
            this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.button1.Location = new System.Drawing.Point(10, 113);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(90, 25);
            this.button1.TabIndex = 4;
            this.button1.Text = "加密";
            this.button1.Click += new System.EventHandler(this.button1_Click);
            // 
            // button2
            // 
            this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.button2.Location = new System.Drawing.Point(10, 144);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(90, 25);
            this.button2.TabIndex = 5;
            this.button2.Text = "解密";
            this.button2.Click += new System.EventHandler(this.button2_Click);
            // 
            // label1
            // 
            this.label1.Location = new System.Drawing.Point(8, 20);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(226, 17);
            this.label1.TabIndex = 6;
            this.label1.Text = "請輸入明文(8個字符=16個字節明文):";
            // 
            // label2
            // 
            this.label2.Location = new System.Drawing.Point(104, 119);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(47, 21);
            this.label2.TabIndex = 7;
            this.label2.Text = "密文:";
            // 
            // label3
            // 
            this.label3.Location = new System.Drawing.Point(104, 150);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(48, 21);
            this.label3.TabIndex = 8;
            this.label3.Text = "解密文:";
            // 
            // label4
            // 
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(288, 95);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(0, 12);
            this.label4.TabIndex = 9;
            // 
            // textBox4
            // 
            this.textBox4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.textBox4.Location = new System.Drawing.Point(96, 56);
            this.textBox4.MaxLength = 16;
            this.textBox4.Name = "textBox4";
            this.textBox4.Size = new System.Drawing.Size(301, 21);
            this.textBox4.TabIndex = 10;
            // 
            // button3
            // 
            this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.button3.Location = new System.Drawing.Point(413, 20);
            this.button3.Name = "button3";
            this.button3.Size = new System.Drawing.Size(58, 57);
            this.button3.TabIndex = 11;
            this.button3.Text = "清除";
            this.button3.UseVisualStyleBackColor = true;
            this.button3.Click += new System.EventHandler(this.button3_Click);
            // 
            // label5
            // 
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(25, 59);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(65, 12);
            this.label5.TabIndex = 12;
            this.label5.Text = "256位密鑰:";
            // 
            // Form1
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
            this.ClientSize = new System.Drawing.Size(487, 214);
            this.Controls.Add(this.label5);
            this.Controls.Add(this.button3);
            this.Controls.Add(this.textBox4);
            this.Controls.Add(this.label4);
            this.Controls.Add(this.label3);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.button2);
            this.Controls.Add(this.button1);
            this.Controls.Add(this.textBox3);
            this.Controls.Add(this.textBox2);
            this.Controls.Add(this.textBox1);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.MaximizeBox = false;
            this.Name = "Form1";
            this.Text = "AES加密與解密";
            this.ResumeLayout(false);
            this.PerformLayout();

    }
		#endregion

		[STAThread]
		static void Main() 
		{
			Application.Run(new Form1());
		}

    private void button1_Click(object sender, System.EventArgs e)
    {
     
      byte[] plainText = new byte[16];//保存明文信息
      //byte[] cipherText = new byte[16];
      //byte[] passwdText = new byte[64]; 


      
      plainText = Encoding.Unicode.GetBytes(textBox1.Text.PadRight(8,' '));//字符串長度不足為8的在后面補上' '
      passwdText = Encoding.Unicode.GetBytes(textBox4.Text.PadRight(16, ' '));//字符串長度不足為16的在后面補上' '
      Aes算法.Aes a = new Aes(passwdText);
      a.Cipher(plainText, cipherText);

      string ciphrtext = "";
      foreach (byte b in cipherText)
      {
          ciphrtext += b.ToString("X") ;//將密文轉變為十六進制的字符串
      }
      
      textBox2.Text = ciphrtext;
    } 

    private void button2_Click(object sender, System.EventArgs e)
    {
    
      //byte[] cipherText = new byte[16];
      byte[] decipheredText = new byte[16];
      //byte[] passwdText = new byte[32];
      


      if (textBox2.Text == "")
      {
          label4.Text = "請先加密";
      }


      else
      {  
          label4.Text = "";
        

          Aes算法.Aes a = new Aes(passwdText);
          a.InvCipher(cipherText, decipheredText);

          
          textBox3.Text = Encoding.Unicode.GetString(decipheredText); ;
           
      }
    }

        private void button3_Click(object sender, EventArgs e)
        {
            textBox1.Text = "";
            textBox2.Text = "";
            textBox3.Text = "";
            textBox4.Text = "";

        }  

	}  
} 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久一级| 亚洲另类中文字| 在线播放国产精品二区一二区四区| 国产资源在线一区| 韩国三级中文字幕hd久久精品| 亚洲成国产人片在线观看| 在线视频国内一区二区| 亚洲欧美乱综合| 欧美一区二区高清| 免费观看91视频大全| 欧美电影免费观看高清完整版在| 日韩国产精品久久久久久亚洲| 亚洲精品在线电影| 不卡av在线免费观看| 亚洲激情自拍视频| 国产日产欧美一区二区视频| 国产真实乱偷精品视频免| 亚洲精品久久嫩草网站秘色| 国产精品人成在线观看免费| 国产精品理论片| 国产视频一区二区在线| 在线不卡a资源高清| 91精品视频网| 日韩一区二区高清| 精品一区二区av| 本田岬高潮一区二区三区| 激情五月婷婷综合网| 亚洲高清视频的网址| 精品国产免费一区二区三区四区| 欧美日韩精品一区二区在线播放| 亚洲成人一区在线| 亚洲一二三专区| 日韩欧美精品在线| 91精品婷婷国产综合久久性色 | 国产三级三级三级精品8ⅰ区| 91精品国模一区二区三区| 国产91露脸合集magnet| 亚洲午夜久久久久久久久久久| 在线观看91精品国产入口| 久久9热精品视频| 久久精品日产第一区二区三区高清版 | 欧美中文字幕一区二区三区 | 中文字幕乱码一区二区免费| 欧美一级欧美三级在线观看| 欧美一区二区三区色| 一区二区三区高清| 中文字幕欧美激情一区| 日韩精品专区在线影院观看| 国产精品情趣视频| 亚洲自拍另类综合| 亚洲午夜视频在线观看| 一区2区3区在线看| 亚洲v日本v欧美v久久精品| 亚洲一区二区影院| 亚洲成a天堂v人片| 蜜臀av性久久久久蜜臀av麻豆 | 另类小说色综合网站| 水野朝阳av一区二区三区| 琪琪久久久久日韩精品| 国产一区二区三区免费播放| av电影在线观看一区| 99久久亚洲一区二区三区青草 | 91视频免费播放| 亚洲视频一二三| 国产宾馆实践打屁股91| 国产精品免费丝袜| 欧美日韩日日摸| 精品久久久久久久人人人人传媒| 精品国产成人系列| 亚洲午夜私人影院| 国产高清精品网站| 在线一区二区视频| 久久综合九色综合欧美98| 亚洲一区二区三区四区中文字幕| 中文字幕第一区| 在线日韩一区二区| 欧美成人一区二区三区| 欧美日韩精品专区| 国产欧美精品国产国产专区| 午夜久久福利影院| 在线一区二区三区做爰视频网站| 在线播放/欧美激情| 国产日韩综合av| 一区二区三区在线高清| 成人av网址在线| 亚洲国产精品综合小说图片区| 精品国产乱码久久久久久牛牛| 成人妖精视频yjsp地址| 日韩国产欧美三级| 亚洲精品写真福利| 久久这里只有精品首页| 欧美午夜在线一二页| 91在线精品一区二区| 国产欧美日韩精品在线| 欧美aaa在线| 国产欧美一区二区精品性色| 国产成人免费高清| 日精品一区二区三区| 亚洲免费观看高清完整版在线 | 成人丝袜视频网| 免费高清在线一区| 亚洲va欧美va人人爽| 一区二区欧美视频| 国产精品麻豆欧美日韩ww| 欧美视频一区在线| 91视频www| 91视视频在线观看入口直接观看www| 精品一区二区三区蜜桃| 日本欧洲一区二区| 日韩黄色片在线观看| 亚洲成人免费在线观看| 国产精品久久久久久久久快鸭 | 日韩精品中文字幕在线一区| 成人丝袜高跟foot| 99精品欧美一区二区蜜桃免费| 国产成人综合视频| 成人av午夜电影| 色综合久久久久久久久久久| 国产一区视频在线看| 亚洲国产高清在线| aaa欧美大片| 久久国产乱子精品免费女| 亚洲视频一二区| 99这里只有久久精品视频| 亚洲欧洲日韩在线| 极品瑜伽女神91| 成人av网站在线| 亚洲四区在线观看| av在线播放一区二区三区| 久久久国产精品麻豆| 成人手机在线视频| 欧美经典一区二区三区| 亚洲一区在线观看网站| 欧美日韩国产首页在线观看| 丝袜美腿亚洲一区二区图片| 欧美三区在线视频| 日日骚欧美日韩| 91精品国产欧美一区二区| 麻豆成人综合网| 久久你懂得1024| 懂色av中文一区二区三区| 欧美韩国日本一区| 91精品黄色片免费大全| 国产日韩一级二级三级| 久久色中文字幕| 3d动漫精品啪啪1区2区免费 | 久久亚洲一区二区三区四区| 在线成人小视频| 91福利国产精品| 在线观看成人小视频| 欧美视频精品在线| 69堂国产成人免费视频| 久久久久亚洲综合| 99久久精品久久久久久清纯| 日日夜夜精品免费视频| 日本一区二区三区免费乱视频| 欧美性色黄大片| 大胆亚洲人体视频| 婷婷中文字幕一区三区| 国产视频一区二区在线| 欧美日韩美少妇| 成人精品小蝌蚪| 日本不卡高清视频| 久久国产精品99久久人人澡| 欧美videos中文字幕| 在线影院国内精品| 国内外成人在线| 午夜视频在线观看一区| 国产精品久久久久久久久动漫 | 国产在线不卡一卡二卡三卡四卡| 亚洲欧洲另类国产综合| 欧美成人福利视频| 欧美色图在线观看| 高清国产一区二区| 日韩高清一级片| 亚洲区小说区图片区qvod| 久久综合色之久久综合| 6080日韩午夜伦伦午夜伦| 91免费看片在线观看| 国产麻豆日韩欧美久久| 日本三级韩国三级欧美三级| 亚洲最新视频在线播放| 国产精品污网站| 久久综合中文字幕| 欧美一区二区三区在线看| 欧美日韩亚洲另类| 色综合久久六月婷婷中文字幕| 国产精品18久久久久久久网站| 男女性色大片免费观看一区二区| 亚洲成人免费视频| 亚洲一区二区美女| 亚洲精品一二三区| 日韩一区中文字幕| 久久精品欧美日韩| 99精品视频一区| 国产亚洲精品资源在线26u| 91精品国产手机| 奇米四色…亚洲| 欧美精品丝袜久久久中文字幕| 亚洲视频你懂的|