最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
DES加密算法在C#下的实现
时间:2022-07-02 11:06: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的倍数
相关文章
- 火影忍者怎么获得大招 05-03
- 星际战甲新手什么刀好 05-03
- 文明6秦始皇金字塔怎么加速 05-03
- 全民奇迹2龙骸巨剑怎么获得 05-03
- 星露谷物语鲟鱼怎么获得 05-03
- 长安幻想怎么转职 05-03