亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? unit1.pas

?? des的delphi實(shí)現(xiàn) 由delphi編程 控件實(shí)現(xiàn)
?? PAS
?? 第 1 頁 / 共 2 頁
字號:
///////////////////////////////////////////////////////////////////////////////
                         //Des DEMO V1.0//
                          //作者:ksaiy//
//歡迎使用由ksaiy制作的DES加密算法演示程序,此算法為標(biāo)準(zhǔn)的DES算法,你可以根據(jù)的
//的自己需要進(jìn)行變形。具體怎么操作可以登錄我們的網(wǎng)站查詢詳細(xì)的資料。我們專門為軟
//件開發(fā)者提供軟件加密安全測試服務(wù)和軟件加密解決方案,具體的可以參看我們的網(wǎng)站上
//的資料。我們的網(wǎng)站:http://www.ksaiy.com  http://www.magicoa.com
//技術(shù)支持:ksaiy@sina.com 在線QQ:40188696 UC:934155
                            //End //

                  //注意:轉(zhuǎn)載請保留以上信息。//                            
///////////////////////////////////////////////////////////////////////////////
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 = // 位選擇函數(shù)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 =  //置換函數(shù)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, 13 ),

      (  4, 11,  2, 14, 15,  0,  8, 13,  3, 12,  9,  7,  5, 10,  6,  1,
        13,  0, 11,  7,  4,  9,  1, 10, 14,  3,  5, 12,  2, 15,  8,  6,
         1,  4, 11, 13, 12,  3,  7, 14, 10, 15,  6,  8,  0,  5,  9,  2,
         6, 11, 13,  8,  1,  4, 10,  7,  9,  5,  0, 15, 14,  2,  3, 12 ),

      ( 13,  2,  8,  4,  6, 15, 11,  1, 10,  9,  3, 14,  5,  0, 12,  7,
         1, 15, 13,  8, 10,  3,  7,  4, 12,  5,  6, 11,  0, 14,  9,  2,
         7, 11,  4,  1,  9, 12, 14,  2,  0,  6, 10, 13, 15,  3,  5,  8,
         2,  1, 14,  7,  4, 10,  8, 13, 15, 12,  9,  0,  3,  5,  6, 11 ) );

  BitPMC1: array[0..55] of Byte = //選擇置換PC-1
    ( 56, 48, 40, 32, 24, 16,  8,
       0, 57, 49, 41, 33, 25, 17,
       9,  1, 58, 50, 42, 34, 26,
      18, 10,  2, 59, 51, 43, 35,
      62, 54, 46, 38, 30, 22, 14,
       6, 61, 53, 45, 37, 29, 21,
      13,  5, 60, 52, 44, 36, 28,
      20, 12,  4, 27, 19, 11,  3 );

  BitPMC2: array[0..47] of Byte =//選擇置換PC-2 
    ( 13, 16, 10, 23,  0,  4,
       2, 27, 14,  5, 20,  9,
      22, 18, 11,  3, 25,  7,
      15,  6, 26, 19, 12,  1,
      40, 51, 30, 36, 46, 54,
      29, 39, 50, 44, 32, 47,
      43, 48, 38, 55, 33, 52,
      45, 41, 49, 35, 28, 31 );

var
  Form1: TForm1;
  subKey: array[0..15] of TKeyByte;  

implementation

{$R *.dfm}

procedure initPermutation(var inData: array of Byte);
var
  newData: array[0..7] of Byte;
  i: Integer;
begin
  FillChar(newData, 8, 0);
  for i := 0 to 63 do
    if (inData[BitIP[i] shr 3] and (1 shl (7- (BitIP[i] and $07)))) <> 0 then
      newData[i shr 3] := newData[i shr 3] or (1 shl (7-(i and $07)));
  for i := 0 to 7 do inData[i] := newData[i];
end;

procedure conversePermutation(var inData: array of Byte);
var
  newData: array[0..7] of Byte;
  i: Integer;
begin
  FillChar(newData, 8, 0);
  for i := 0 to 63 do
    if (inData[BitCP[i] shr 3] and (1 shl (7-(BitCP[i] and $07)))) <> 0 then
      newData[i shr 3] := newData[i shr 3] or (1 shl (7-(i and $07)));
  for i := 0 to 7 do inData[i] := newData[i];
end;

procedure expand(inData: array of Byte; var outData: array of Byte);
var
  i: Integer;
begin
  FillChar(outData, 6, 0);
  for i := 0 to 47 do
    if (inData[BitExp[i] shr 3] and (1 shl (7-(BitExp[i] and $07)))) <> 0 then
      outData[i shr 3] := outData[i shr 3] or (1 shl (7-(i and $07)));
end;

procedure permutation(var inData: array of Byte);
var
  newData: array[0..3] of Byte;
  i: Integer;
begin
  FillChar(newData, 4, 0);
  for i := 0 to 31 do
    if (inData[BitPM[i] shr 3] and (1 shl (7-(BitPM[i] and $07)))) <> 0 then
      newData[i shr 3] := newData[i shr 3] or (1 shl (7-(i and $07)));
  for i := 0 to 3 do inData[i] := newData[i];
end;

function si(s,inByte: Byte): Byte;
var
  c: Byte;
begin
  c := (inByte and $20) or ((inByte and $1e) shr 1) or
    ((inByte and $01) shl 4);
  Result := (sBox[s][c] and $0f);
end;

procedure permutationChoose1(inData: array of Byte;
  var outData: array of Byte);
var
  i: Integer;
begin
  FillChar(outData, 7, 0);
  for i := 0 to 55 do
    if (inData[BitPMC1[i] shr 3] and (1 shl (7-(BitPMC1[i] and $07)))) <> 0 then
      outData[i shr 3] := outData[i shr 3] or (1 shl (7-(i and $07)));
end;

procedure permutationChoose2(inData: array of Byte;
  var outData: array of Byte);
var
  i: Integer;
begin
  FillChar(outData, 6, 0);
  for i := 0 to 47 do
    if (inData[BitPMC2[i] shr 3] and (1 shl (7-(BitPMC2[i] and $07)))) <> 0 then
      outData[i shr 3] := outData[i shr 3] or (1 shl (7-(i and $07)));
end;

procedure cycleMove(var inData: array of Byte; bitMove: Byte);
var
  i: Integer;
begin
  for i := 0 to bitMove - 1 do
  begin
    inData[0] := (inData[0] shl 1) or (inData[1] shr 7);
    inData[1] := (inData[1] shl 1) or (inData[2] shr 7);
    inData[2] := (inData[2] shl 1) or (inData[3] shr 7);
    inData[3] := (inData[3] shl 1) or ((inData[0] and $10) shr 4);
    inData[0] := (inData[0] and $0f);
  end;
end;

procedure makeKey(inKey: array of Byte; var outKey: array of TKeyByte);
const
  bitDisplace: array[0..15] of Byte =
    ( 1,1,2,2, 2,2,2,2, 1,2,2,2, 2,2,2,1 );
var
  outData56: array[0..6] of Byte;
  key28l: array[0..3] of Byte;
  key28r: array[0..3] of Byte;
  key56o: array[0..6] of Byte;
  i: Integer;
begin
  permutationChoose1(inKey, outData56);

  key28l[0] := outData56[0] shr 4;
  key28l[1] := (outData56[0] shl 4) or (outData56[1] shr 4);
  key28l[2] := (outData56[1] shl 4) or (outData56[2] shr 4);
  key28l[3] := (outData56[2] shl 4) or (outData56[3] shr 4);
  key28r[0] := outData56[3] and $0f;
  key28r[1] := outData56[4];
  key28r[2] := outData56[5];
  key28r[3] := outData56[6];

  for i := 0 to 15 do
  begin

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美在线观看一区二区| 欧美大胆一级视频| 欧美96一区二区免费视频| 国产欧美一区二区在线| 欧美日韩一级片在线观看| 成人午夜视频免费看| 日本成人超碰在线观看| 一区二区在线观看视频| 国产午夜精品理论片a级大结局| 欧美中文字幕一区| 成人午夜精品在线| 老司机免费视频一区二区三区| 一区二区在线观看免费| 日本一区二区不卡视频| 欧美成人激情免费网| 欧美色精品在线视频| 91视频在线观看免费| 粗大黑人巨茎大战欧美成人| 捆绑调教一区二区三区| 亚洲成人福利片| 亚洲三级久久久| 国产精品免费aⅴ片在线观看| 精品黑人一区二区三区久久 | 日韩一区精品字幕| 亚洲天堂精品视频| 久久九九久久九九| 欧美mv日韩mv亚洲| 91精品国产综合久久精品麻豆| 91久久精品一区二区二区| 99视频精品在线| 成人精品视频.| 丁香啪啪综合成人亚洲小说| 国内成人精品2018免费看| 麻豆精品视频在线观看视频| 香蕉成人伊视频在线观看| 一区二区三区视频在线看| 亚洲三级在线观看| 亚洲品质自拍视频网站| 亚洲丝袜制服诱惑| 亚洲人123区| 亚洲一线二线三线久久久| 一区二区高清视频在线观看| 亚洲欧美区自拍先锋| 亚洲欧美韩国综合色| 一区二区三区在线免费观看| 亚洲激情网站免费观看| 亚洲一级在线观看| 午夜精品aaa| 麻豆视频观看网址久久| 国产一区二区三区四| 国产成人免费视频网站高清观看视频| 国产精品一区专区| 成人短视频下载| 欧美影院一区二区| 欧美一区二区三区四区五区| 日韩一二三四区| 久久精品人人做人人综合| 中文字幕va一区二区三区| 亚洲乱码国产乱码精品精小说| 亚洲精品大片www| 视频一区二区三区在线| 国内精品伊人久久久久av一坑 | 精品一区二区免费视频| 国产精品自在在线| 99国产麻豆精品| 欧美视频一二三区| 日韩欧美一级片| 国产精品嫩草影院av蜜臀| 一区二区免费在线| 久久99在线观看| 99国内精品久久| 日韩一区二区免费电影| 国产精品亲子乱子伦xxxx裸| 亚洲综合男人的天堂| 久久超碰97人人做人人爱| 成人免费视频一区二区| 在线亚洲高清视频| 亚洲精品在线电影| 亚洲精品一卡二卡| 久久se精品一区精品二区| av不卡在线观看| 欧美一区二区私人影院日本| 中文字幕欧美激情一区| 丝袜美腿亚洲一区| 不卡的av在线| 日韩精品一区二区三区四区视频| 国产精品区一区二区三区| 天天综合色天天综合色h| 国产成人精品网址| 欧美巨大另类极品videosbest | 欧美一区二区视频在线观看2022 | 国产福利一区二区三区视频在线| 91美女片黄在线观看| 欧美xxxxxxxx| 一区二区久久久久久| 风流少妇一区二区| 欧美精品在线一区二区| 中文字幕亚洲区| 精品一区二区久久| 欧美色图一区二区三区| 国产精品热久久久久夜色精品三区 | 欧美亚一区二区| 中文字幕不卡在线观看| 久久成人免费电影| 欧美日韩1234| 1024亚洲合集| 丰满少妇久久久久久久| 日韩欧美激情一区| 午夜欧美在线一二页| 91捆绑美女网站| 国产精品久久久久久久蜜臀| 国产一区二区影院| 欧美精品日韩精品| 一区二区三区视频在线看| gogo大胆日本视频一区| 国产清纯白嫩初高生在线观看91 | 另类调教123区| 在线91免费看| 亚洲一区二区三区四区在线| av午夜一区麻豆| 国产精品情趣视频| 丁香天五香天堂综合| 久久亚洲综合色一区二区三区| 日韩福利视频网| 欧美日韩极品在线观看一区| 亚洲大片免费看| 欧洲激情一区二区| 亚洲精选视频在线| a4yy欧美一区二区三区| 中文字幕+乱码+中文字幕一区| 国产精品69久久久久水密桃| 久久众筹精品私拍模特| 国产剧情一区在线| 日韩精品一区二区在线观看| 美女看a上一区| 精品理论电影在线| 国产在线精品不卡| 国产欧美一区二区精品秋霞影院| 粉嫩aⅴ一区二区三区四区五区| 久久精品亚洲精品国产欧美| 福利一区二区在线观看| 亚洲欧洲精品天堂一级| 91亚洲精品久久久蜜桃| 亚洲午夜在线视频| 欧美精品丝袜中出| 久久超碰97人人做人人爱| 久久久国产精品午夜一区ai换脸| 国产成人免费在线| 亚洲欧美日韩一区二区三区在线观看 | 亚洲一区成人在线| 6080yy午夜一二三区久久| 美女mm1313爽爽久久久蜜臀| 精品久久五月天| 成年人国产精品| 亚洲第一搞黄网站| 亚洲精品一区二区精华| 国产成人精品网址| 亚洲综合色在线| 日韩欧美亚洲国产另类| 国产成人在线色| 亚洲免费毛片网站| 欧美一区三区二区| 国产精品一二三区| 夜夜嗨av一区二区三区网页| 91精品国模一区二区三区| 国产精一区二区三区| 亚洲男人的天堂av| 欧美一级二级在线观看| 国产99精品国产| 亚洲午夜一区二区三区| 亚洲精品在线电影| 色94色欧美sute亚洲13| 青青草国产成人99久久| 国产精品久久午夜| 欧美精品v国产精品v日韩精品| 狠狠网亚洲精品| 亚洲一区二区在线视频| 久久久久久久av麻豆果冻| 欧美性受xxxx| 国产精品1区二区.| 亚洲成人动漫av| 国产日本亚洲高清| 欧美高清dvd| 97精品久久久久中文字幕 | 亚洲精品免费在线观看| 日韩一区二区在线观看视频播放 | 欧美tk—视频vk| 一本一道波多野结衣一区二区 | 欧美亚洲综合网| 成人三级在线视频| 久久草av在线| 亚洲成人免费观看| 中文字幕一区二区三区四区| 日韩三级在线观看| 欧美亚洲日本一区| 国产91精品欧美| 蜜臀av性久久久久蜜臀aⅴ流畅| 亚洲人一二三区| 国产色爱av资源综合区| 欧美一级片在线看|