文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > 计算机软件及应用 > DES算法Delphi源代码
侵权投诉

DES算法Delphi源代码

unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Label1: TLabel; Label2: TLabel; Edit1: TEdit; Edit2: TEdit; Button1: TButton; Button2: TButton; Label3: TLabel; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } end; type TKeyByte = array[0..5] of Byte; TDesMode = (dmEncry, dmDecry); function EncryStr(Str, Key: String): String; function DecryStr(Str, Key: String): String; function EncryStrHex(Str, Key: String): String; function DecryStrHex(StrHex, Key: String): String; const BitIP: array[0..63] of Byte = //初始值置IP (57, 49, 41, 33, 25, 17, 9, 1, 59, 51, 43, 35, 27, 19, 11, 3, 61, 53, 45, 37, 29, 21, 13, 5, 63, 55, 47, 39, 31, 23, 15, 7, 56, 48, 40, 32, 24, 16, 8, 0, 58, 50, 42, 34, 26, 18, 10, 2, 60, 52, 44, 36, 28, 20, 12, 4, 62, 54, 46, 38, 30, 22, 14, 6 ); BitCP: array[0..63] of Byte = //逆初始置IP-1 ( 39, 7, 47, 15, 55, 23, 63, 31, 38, 6, 46, 14, 54, 22, 62, 30, 37, 5, 45, 13, 53, 21, 61, 29, 36, 4, 44, 12, 52, 20, 60, 28, 35, 3, 43, 11, 51, 19, 59, 27, 34, 2, 42, 10, 50, 18, 58, 26, 33, 1, 41, 9, 49, 17, 57, 25, 32, 0, 40, 8, 48, 16, 56, 24 ); BitExp: array[0..47] of Integer = // 位选择函数E ( 31, 0, 1, 2, 3, 4, 3, 4, 5, 6, 7, 8, 7, 8, 9,10, 11,12,11,12,13,14,15,16,15,16,17,18,19,20,19,20, 21,22,23,24,23,24,25,26,27,28,27,28,29,30,31,0 ); BitPM: array[0..31] of Byte = //置换函数P ( 15, 6,19,20,28,11,27,16, 0,14,22,25, 4,17,30, 9, 1, 7,23,13,31,26, 2, 8,18,12,29, 5,21,10, 3,24 ); sBox: array[0..7] of array[0..63] of Byte = //S盒 ( ( 14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7, 0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8, 4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0, 15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13 ), ( 15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10, 3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5, 0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15, 13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9 ), ( 10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8, 13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1, 13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7, 1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12 ), ( 7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15, 13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9, 10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4, 3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14 ), ( 2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9, 14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6, 4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14, 11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3 ), ( 12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11, 10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8, 9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6, 4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8

第1页

你可能喜欢

热门文档

相关文档

  • DES算法用C++实现的源代码

    C实现DES加密算法(代码) 4页 1下载券 DES算法代码及实验报告 19页 4下载券 DES算法的C语言实现 18页 2下载券 DES算法Delphi源代码 暂无评价 5页 免费 des...

  • 【论文】Rijndael算法运算部件Delphi实现

    Riindael作为美国高级加密标准算法,具备较好的可靠性和抗攻击能力,将代替DES在各...逆S盒、列混合变换、逆列混合变换的基本原理和算法,并用Delphi语言编写出源代码...

  • MD5哈希算法(Delphi源码)

    MD5哈希算法(Delphi源码)_专业资料。MD5哈希算法特别说明此资料来自豆丁网(http://www.docin.com/) 您现在所看到的文档是使用下载器所生成的文档 此文档的原件...

  • delphi简单文本加密算法

    delphi简单文本加密算法_IT/计算机_专业资料。delphi简单文本加密算法,源代码... delphi加密解密 6页 1下载券 Delphi实现对文档的加密... 3页 免费 DES ...

  • Delphi代码的标准风格,值得一看。

    Delphi代码的标准风格,值得一看。_计算机软件及应用_IT/计算机_专业资料。我们承认许多好的已经确定的工作室或个人,拥有他们自己的和本文里所说的不同的编程习惯,...

  • delphi源代码

    delphi源代码_IT/计算机_专业资料。经验积累而成的delphi源码---有问题的代码 <appSettings> <add key="ConnectionString" value="server=192.168.1.66,1433;da...

  • delphi源程序代码规范

    delphi源程序代码规范_计算机软件及应用_IT/计算机_专业资料。Delphi源程序代码...关键性的算法行应在行末用//注释算法目的。事件、 方法内部的变量定义时必须...

  • VC_与Delphi源代码的互译详解

    以大量举例的形式给出了 VC++与 Delphi 的代码互译, 首次做到了对 VC++与 Delphi 程序的沟通, 为算法研究及软件开发人 员提供了可靠的代码转换依据, 具有...

  • 暴雪最快hash算法源码_jluzc

    MD5哈希算法(Delphi源码... 10页 免费 数据结构与算法课程设计... 16页 2...暴雪最快 hash 算法源码 Jluz 2012.12.14 中国有句古话"再一再二不能再三再...

  • Delphi代码

    Delphi代码_IT/计算机_专业资料。Delphi编程代码总界面: {$R *.dfm} uses unit2; procedure TForm1.Button1Click(Sender: TObject); begin form2.Show; form...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email