C#—非对称加密:加密文件(1)
C#—非对称加密:加密文件★★★★★★ ☆☆☆ ★★★★★★●●○○ 聂永 ○○●●§§§§nie_yong@163.com§§§§◆◆□□nie.yong@126.com□□◆◆№№№№№№ ※※※ №№№№№№说明:1.你要注意的是读取文件的两种不同方式;2.从已经保存的钥匙文件中读取其内容;3.这个程序做的很粗糙(要准备考外语六级,要准备期末考试,实在很忙啊!),希望诸位能够完善,然后也发表出来,在下表示感谢;4.参考书目: 《C#数据安全手册》;5.有做这方面程序的朋友,愿意相交。代码部分:
using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.IO;using System.Text;using System.Security.Cryptography;using System.Threading;
namespace 非对称加密{ /// <summary> /// Form1 的摘要说明。 /// </summary> public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.TabPage tabPage3; private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; private System.Windows.Forms.Button button3; private System.Windows.Forms.SaveFileDialog save; private System.Windows.Forms.Label label1; private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.Button button4; private System.Windows.Forms.Button button5; private System.Windows.Forms.Label label2; private System.Windows.Forms.RichTextBox richtext2; private System.Windows.Forms.OpenFileDialog open; private System.Windows.Forms.Label label3;