.
.
轻工业学院
课程设计报告
名称:
信息平安概论
指导教师:
吉星、程立辉
:
符豪
学号:
2
班级:
网络工程13-01
目的
数据加密技术要求只有在指定的用户或网络下,;
using ;
using ;
using ;
using ;
using ;
namespace WindowsFormsApplication1
{
classEncrypter
{
//DES默认密钥向量
privatestaticbyte[] DES_IV = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF };
publicstaticstring EncryptByMD5(string input)
{
MD5 md5Hasher = ();
byte[] data = ((input));
StringBuilder sBuilder = newStringBuilder();
for (int i = 0; i < ; i++)
{
(data[i].ToString("x2"));
}
return ();
}
publicstaticstring EncryptByDES(string input, string key)
{
byte[] inputBytes = (input);
byte[] keyBytes = (key);
byte[] encryptBytes = EncryptByDES(inputBytes, keyBytes, keyBytes);
.
.
using (DES des = newDESCryptoServiceProvider())
{
using (MemoryStream ms = newMemoryStream())
{
using (CryptoStream cs = newCryptoStream(ms, (), ))
{
using (StreamWriter writer = newStreamWriter(cs))
{
信息安全实验报告信息安全概论课程设计报告 来自淘豆网m.daumloan.com转载请标明出处.