最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
DES加密算法在C#下的实现
时间:2008-01-12 编辑:简简单单 来源:一聚教程网
此程序分两部分,第一部分为主程序,另一部分为函数库
本程序中用int[]表示char的2进制形式,如a=int[8]{0,1,1,0,0,0,0,1}
下面副程序 本程序在C# 2005下通过。。
#region Using directives
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using System.IO;
#endregion
namespace DES_2nd
{
partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Func.Func F = new Func.Func(); // 初始化函数库
private void button1_Click(object sender, EventArgs e)
{
char[] tempmchar = mbox.Text.ToCharArray(); //原始明文
int mod = tempmchar.Length % 8; //扩展明文为8的倍数
本程序中用int[]表示char的2进制形式,如a=int[8]{0,1,1,0,0,0,0,1}
下面副程序 本程序在C# 2005下通过。。
#region Using directives
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using System.IO;
#endregion
namespace DES_2nd
{
partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Func.Func F = new Func.Func(); // 初始化函数库
private void button1_Click(object sender, EventArgs e)
{
char[] tempmchar = mbox.Text.ToCharArray(); //原始明文
int mod = tempmchar.Length % 8; //扩展明文为8的倍数
相关文章
- C#实现的MD5加密功能与用法示例 03-06
- C#用Dotfuscator混淆器加密代码的方法 02-02
- RC2加密算法在C#的应用----完善版 01-12
- C#复制数组的两种方式及效率比较解读 10-24
- ASP.NET Identity用法解析 10-24
- ASP.NET MVC使用Identity增删改查用户介绍 10-24