به:پاسخ گويي به سوالات ++C
سه شنبه 4 خرداد 1395 2:29 AM
سلام من بایداین کدهاراخط به خط توضیح بدم پروژمه لطفاکسی بلده برام توضیح بده ممنون خیلی ضروریه.
بااستفاده ازالگوریتم aes متن روگرفته ورمزنگاری کرده
namespace WindowsApplication3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string str = "";
AES_Encryption.AES a = new AES_Encryption.AES();
str = a.Encrypt(textBox1.Text, "1", 128);
using (StreamWriter sw = new StreamWriter(@"g:1.dat"))
{
sw.Write(str);
}
richTextBox1.Text = str;
}
private void button2_Click(object sender, EventArgs e)
{
string str;
using (StreamReader sr = new StreamReader(@"g:1.dat"))
{
str = sr.ReadToEnd();
}
AES_Encryption.AES a = new AES_Encryption.AES();
richTextBox1.Text = a.Decrypt(str, "1", 128);
}
private void button3_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://WWw.SourceCodes.ir");
}
}
}