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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ciphers.html

?? DCPcrypt Cryptographic Component Library v2
?? HTML
?? 第 1 頁 / 共 2 頁
字號:
<html>
  <head>
    <title>DCPcrypt v2: Users Guide - Ciphers</title>
  </head>
  <body>
    <p align="center"><font size="+2"><b>DCPcrypt Cryptographic Component Library v2</b></font><br>
      <font size="+1">Copyright &copy; 1999-2002 David Barton<br>
      <a href="http://www.cityinthesky.co.uk/">http://www.cityinthesky.co.uk/</a><br>
      <a href="mailto:crypto@cityinthesky.co.uk">crypto@cityinthesky.co.uk</a></font>
    <p><font size="+2">Ciphers - TDCP_cipher</font>
    <p>All ciphers are inherited from the TDCP_cipher component either directly for stream ciphers (such as RC4) or via the TDCP_blockcipher component.
    <p>The TDCP_cipher component implements key initialisation features and the basic encryption/decryption interface. Functions available are:
    <pre>
      property <a href="#Initialized">Initialized</a>: boolean;
      property <a href="#Id">Id</a>: integer;
      property <a href="#Algorithm">Algorithm</a>: string;
      property <a href="#MaxKeySize">MaxKeySize</a>: integer;
  
      class function <a href="#SelfTest">SelfTest</a>: boolean;
  
      procedure <a href="#Init">Init</a>(const Key; Size: longword; InitVector: pointer); 
      procedure <a href="#InitStr">InitStr</a>(const Key: string; HashType: TDCP_hashclass);
      procedure <a href="#Burn">Burn</a>; 
      procedure <a href="#Reset">Reset</a>;
      procedure <a href="#Encrypt">Encrypt</a>(const Indata; var Outdata; Size: longword); 
      procedure <a href="#Decrypt">Decrypt</a>(const Indata; var Outdata; Size: longword); 
      function <a href="#EncryptStream">EncryptStream</a>(InStream, OutStream: TStream; Size: longword): longword;
      function <a href="#DecryptStream">DecryptStream</a>(InStream, OutStream: TStream; Size: longword): longword;
      function <a href="#EncryptString">EncryptString</a>(const Str: string): string; 
      function <a href="#DecryptString">DecryptString</a>(const Str: string): string; 
    </pre>
    <p>Example usage:
    <ul>
      <li><a href="#Example1">Example 1</a> - String encryption.
      <li><a href="#Example2">Example 2</a> - File encryption.
      <li><a href="#Example3">Example 3</a> - General encryption.
    </ul>
    <hr>
    <p><font size="+2">Function descriptions</font>
    <p><font size="+1"><a name="Initialized">property Initialized: boolean;</a></font>
    <p>Once key initialization has been performed this property is set to true, otherwise it is set to false. Calling <a href="#Burn">Burn</a> will immediately set this to false.
    <p><font size="+1"><a name="Id">property Id: integer;</a></font>
    <p>Every algorithm I implement gets given a unique ID number so that if I use several different algorithms within a program I can determine which one was used. This is a purely arbitrary numbering system. 
    <p><font size="+1"><a name="Algorithm">property Algorithm: string;</a></font>
    <p>This contains the name of the algorithm implemented within the component.      
    <p><font size="+1"><a name="MaxKeySize">property MaxKeySize: integer;</a></font>
    <p>This is the maximum size of key you can pass to the cipher (in bits!).
    <p><font size="+1"><a name="SelfTest">class function SelfTest: boolean;</a></font>
    <p>In order to test whether the implementations have all been compiled correctly you can call the SelfTest function. This compares the results of several encryption/decryption operations with known results for the algorithms (so called test vectors). If all the tests are passed then true is returned. If ANY of the tests are failed then false is returned. You may want to run this function for all the components when you first install the DCPcrypt package and again if you modify any of the source files, you don't need to run this everytime your program is run. Note: this only performs a selection of tests, it is not exhaustive.
    <p><font size="+1"><a name="Init">procedure Init(const Key; Size: longword; InitVector: pointer);</a></font>
    <p>This procedure initializes the cipher with the keying material supplied in Key. The Size of the keying material is specified in <b>BITS</b>. The InitVector is a pointer to chaining information (only used for block ciphers). The variable that this points to should be equal to the block size of the algorithm. If <em>nil</em> is specified then (if necessary) an initialization vector is automatically generated from the key. Note: the method for generating automatic IVs is different from DCPcrypt v1.31, if this is a problem uncomment the DCPcrypt v1.31 compatibility mode line in DCPcrypt2.pas.
    <p>Init example: use the hash of a string to initialize the cipher
    <pre>
  <b>procedure</b> TForm1.Button1Click(Sender: TObject);
  <b>var</b>
    Cipher: TDCP_rc4;
    Hash: TDCP_sha1;
    Digest: <b>array</b>[0..19] <b>of byte</b>;  <em>// SHA-1 produces a 160bit (20byte) output</em>
  <b>begin</b>
    Hash:= TDCP_sha1.Create(Self);
    Hash.Init;                     <em>// initialize the hash</em>
    Hash.UpdateStr(Edit1.Text);    <em>// generate a hash of Edit1.Text</em>
    Hash.Final(Digest);            <em>// save the hash in Digest</em>
    Hash.Free;
    Cipher:= TDCP_rc4.Create(Self);
    Cipher.Init(Digest,Sizeof(Digest)*8,<b>nil</b>);  <em>// remember size is in BITS (hence sizeof*8)</em>
    ...
    </pre>
    <p><font size="+1"><a name="InitStr">procedure InitStr(const Key: string; HashType: TDCP_hashclass);</a></font>
    <p>This procedure initializes the cipher with a hash of the key string using the specified hash type (in a way similar to the example above). To replicate the behaviour from DCPcrypt v2 Beta 1 use Cipher.InitStr(KeyStr,TDCP_sha1).
    <p>InitStr example: prompt the user for a passphrase to initialize the cipher
    <pre>
  <b>procedure</b> TForm1.Button1Click(Sender: TObject);
  <b>var</b>
    Cipher: TDCP_rc4;
  <b>begin</b>
    Cipher:= TDCP_rc4.Create(Self);
    Cipher.InitStr(InputBox('Passphrase','Enter a passphrase',''),TDCP_sha1); <em>// prompt for a passphrase</em>
    ...
    </pre>
    <p><font size="+1"><a name="Burn">procedure Burn;</a></font>
    <p>Once you have finished encrypting/decrypting all your data call Burn to erase all keying information. This is automatically called once the cipher is freed, however it is a good habit to call this procedure explicitly.
    <p><font size="+1"><a name="Reset">procedure Reset;</a></font>
    <p>Stream ciphers (and block ciphers in chaining modes) generally store chaining information that is dependant on the information already encrypted. Consequently decrypting a block of information immediately after encrypting it won't result in the original information because when you called the decrypt procedure the chaining information was different from when you called the encrypt procedure. Hence use Reset to restore the chaining information to it's original state.
    <p>Remember that calling <a href="#EncryptString">EncryptString</a>, <a href="#DecryptString">DecryptString</a>, <a href="#EncryptStream">EncryptStream</a> and <a href="#DecryptStream">DecryptStream</a> will also affect the chaining information.
    <p>Reset example: encrypting and decrypting
    <pre>
  <b>function</b> TestCipher: <b>boolean</b>;
  <b>const</b>
    InData: <b>array</b>[0..9] <b>of byte</b>= ($01,$23,$45,$56,$67,$78,$89,$10,$AB,$FF);
  <b>var</b>
    Cipher: TDCP_rc4;
    Data: <b>array</b>[0..9] <b>of byte</b>;
  <b>begin</b>
    Cipher:= TDCP_rc4.Create(<b>nil</b>);
    Cipher.InitStr('Hello World',TDCP_sha1);   <em>// initialize the cipher</em>
    Cipher.Encrypt(InData,Data,Sizeof(Data));  <em>// encrypt some known data</em>
    Cipher.Decrypt(Data,Data,Sizeof(Data));    <em>// now decrypt it</em>
    Cipher.Burn;                               <em>// clear keying information</em>
    Cipher.Free;
    Result:= CompareMem(@InData,@Data,Sizeof(Data));  <em>// compare input and output</em>
  <b>end</b>;
    </pre>
    The above will ALWAYS result in false due to the chaining information.
    <pre>
  <b>function</b> TestCipher: <b>boolean</b>;
  <b>const</b>
    InData: <b>array</b>[0..9] <b>of byte</b>= ($01,$23,$45,$56,$67,$78,$89,$10,$AB,$FF);
  <b>var</b>
    Cipher: TDCP_rc4;
    Data: <b>array</b>[0..9] <b>of byte</b>;
  <b>begin</b>
    Cipher:= TDCP_rc4.Create(<b>nil</b>);
    Cipher.InitStr('Hello World',TDCP_sha1);   <em>// initialize the cipher</em>
    Cipher.Encrypt(InData,Data,Sizeof(Data));  <em>// encrypt some known data</em>
    Cipher.Reset;                              <em><b>// reset chaining information</b></em>
    Cipher.Decrypt(Data,Data,Sizeof(Data));    <em>// now decrypt it</em>
    Cipher.Burn;                               <em>// clear keying information</em>
    Cipher.Free;
    Result:= CompareMem(@InData,@Data,Sizeof(Data));  <em>// compare input and output</em>
  <b>end</b>;
    </pre>
    The above <em>should</em> always return true.
    <p><font size="+1"><a name="Encrypt">procedure Encrypt(const Indata; var Outdata; Size: longword);</a></font>
    <p>Encrypt Size bytes from Indata and place it in Outdata. Block ciphers encrypt the data using the method specified by the <a href="BlockCiphers.html#CipherMode">CipherMode</a> property. Also see the notes on <a href="#Reset">Reset</a>.
    <p><font size="+1"><a name="Decrypt">procedure Decrypt(const Indata; var Outdata; Size: longword);</a></font>
    <p>Decrypt Size bytes from Indata and place it in Outdata. Block ciphers decrypt the data using the method specified by the <a href="BlockCiphers.html#CipherMode">CipherMode</a> property. Also see the notes on <a href="#Reset">Reset</a>.
    <p><font size="+1"><a name="EncryptStream">function EncryptStream(InStream, OutStream: TStream; Size: longword): longword;</a></font>
    <p>Encrypt Size bytes from the InStream and place it in the OutStream, returns the number of bytes read from the InStream. Encryption is done by calling the <a href="#Encrypt">Encrypt</a> procedure. Also see the notes on <a href="#Reset">Reset</a>.
    <p><font size="+1"><a name="DecryptStream">function DecryptStream(InStream, OutStream: TStream; Size: longword): longword;</a></font>
    <p>Decrypt Size bytes from the InStream and place it in the OutStream, returns the number of bytes read from the InStream. Decryption is done by calling the <a href="#Decrypt">Decrypt</a> procedure. Also see the notes on <a href="#Reset">Reset</a>.
    <p><font size="+1"><a name="EncryptString">function EncryptString(const Str: string): string;</a></font>
    <p>Encrypt the string Str then Base64 encode it and return the result. For stream ciphers the <a href="#Encrypt">Encrypt</a> procedure is called to do the encryption, for block ciphers the <a href="BlockCiphers.html#EncryptCFB8bit">CFB8bit</a> method is always used. Base64 encoding is used to ensure that the output string doesn't contain non-printing characters.
    <p><font size="+1"><a name="DecryptString">function DecryptString(const Str: string): string;</a></font>
    <p>Base64 decode the string then decrypt it and return the result. For stream ciphers the <a href="#Decrypt">Decrypt</a> procedure is called to do the decryption, for block ciphers the <a href="BlockCiphers.html#DecryptCFB8bit">CFB8bit</a> method is always used.
    <hr>
    <p><font size="+2"><a name="Example1">Example 1: String encryption</a></font>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩第一区日日骚| 国产馆精品极品| 丝袜美腿亚洲色图| 国产真实乱对白精彩久久| 99久久婷婷国产综合精品| 精品国产免费一区二区三区香蕉| 国产精品久久久久久久久免费樱桃 | 亚洲欧美一区二区视频| 日产国产高清一区二区三区| 色综合av在线| 国产精品热久久久久夜色精品三区| 日韩电影免费在线看| 972aa.com艺术欧美| 26uuu色噜噜精品一区二区| 午夜影视日本亚洲欧洲精品| 色猫猫国产区一区二在线视频| 国产网站一区二区| 精品一区二区久久| 日韩一区二区三区在线视频| 亚洲午夜在线电影| 色婷婷综合五月| 国产精品久99| 白白色亚洲国产精品| 久久蜜桃av一区精品变态类天堂| 图片区小说区区亚洲影院| 91欧美一区二区| 中文字幕一区二区视频| 成人国产精品免费观看动漫| 久久精品夜夜夜夜久久| 国产综合久久久久久久久久久久 | 国产日韩欧美电影| 狠狠色狠狠色综合系列| 精品少妇一区二区三区免费观看 | 亚洲成人777| 色婷婷综合久久久久中文一区二区| 国产精品麻豆久久久| 丰满少妇久久久久久久| 国产视频一区二区三区在线观看 | 亚洲欧洲美洲综合色网| 成人美女视频在线观看| 中文字幕精品—区二区四季| 成人污视频在线观看| 自拍偷拍国产精品| 日本久久电影网| 日韩成人一区二区三区在线观看| 欧美日韩电影在线| 日韩精品国产欧美| 欧美视频三区在线播放| 综合中文字幕亚洲| 91在线云播放| 亚洲影视在线播放| 91麻豆免费看| 日韩经典中文字幕一区| 日韩区在线观看| 国产一二精品视频| 中文字幕亚洲一区二区av在线| 成人短视频下载| 一区二区不卡在线视频 午夜欧美不卡在 | 在线视频欧美精品| 日本视频一区二区三区| 日韩精品五月天| 色婷婷综合久久久中文字幕| 欧美精品在线观看播放| 日本欧美久久久久免费播放网| 精品国产一区二区三区忘忧草| 国产麻豆精品视频| 日韩美女啊v在线免费观看| 在线视频观看一区| 91在线国产观看| 五月天一区二区| 国产亚洲成年网址在线观看| 91在线精品一区二区| 日本 国产 欧美色综合| 国产亚洲欧美一级| 欧美视频一区在线| 国产乱色国产精品免费视频| 亚洲综合色噜噜狠狠| 欧美α欧美αv大片| 色综合欧美在线视频区| 极品少妇一区二区| 亚洲制服丝袜av| 国产清纯白嫩初高生在线观看91 | 免费成人在线播放| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 欧美日韩一区二区三区四区五区| 国产裸体歌舞团一区二区| 亚洲电影一区二区| 亚洲国产精品av| 日韩精品专区在线| 欧美日韩高清影院| 91麻豆自制传媒国产之光| 狠狠色丁香婷综合久久| 亚洲一二三四区不卡| 日本一二三不卡| 欧美成人在线直播| 欧美影院午夜播放| 91在线视频观看| 大桥未久av一区二区三区中文| 免费人成精品欧美精品| 亚洲黄色av一区| 国产欧美日韩在线| 久久久久久久久97黄色工厂| 日韩精品一区国产麻豆| 制服丝袜一区二区三区| 欧美三级日韩三级| 色欧美88888久久久久久影院| 丁香激情综合五月| 国产很黄免费观看久久| 国产精品12区| 国产乱淫av一区二区三区| 激情五月婷婷综合网| 久久精品99久久久| 麻豆91精品91久久久的内涵| 青青草97国产精品免费观看 | 91精品国产福利在线观看| 91在线观看免费视频| av网站免费线看精品| 成人激情午夜影院| 成人国产电影网| 本田岬高潮一区二区三区| 成人做爰69片免费看网站| 国产成人精品免费| 成人免费视频网站在线观看| 成人午夜视频在线观看| 成人美女视频在线观看| 91浏览器打开| 欧美日韩一区 二区 三区 久久精品| 欧美在线影院一区二区| 欧美私模裸体表演在线观看| 欧美日韩1区2区| 日韩美女主播在线视频一区二区三区 | 国产精品全国免费观看高清| 国产女主播视频一区二区| 国产喂奶挤奶一区二区三区| 亚洲欧美在线另类| 亚洲自拍偷拍麻豆| 免费成人在线网站| 国产精品亚洲综合一区在线观看| 国产精品99久久久久久久vr| 99免费精品视频| 欧美久久高跟鞋激| 国产日韩在线不卡| 日韩毛片视频在线看| 亚洲国产日韩一区二区| 欧美a一区二区| 国产aⅴ精品一区二区三区色成熟| 日本精品免费观看高清观看| 91麻豆精品国产91久久久久久| 久久久久久久一区| 亚洲黄一区二区三区| 蜜桃精品视频在线观看| 成人av电影免费在线播放| 欧美伊人久久久久久久久影院| 欧美成人激情免费网| 专区另类欧美日韩| 精品一区二区三区香蕉蜜桃| 91香蕉国产在线观看软件| 日韩欧美一级特黄在线播放| 亚洲日本免费电影| 国内精品国产成人国产三级粉色 | 亚洲男同1069视频| 五月婷婷色综合| 成人网在线免费视频| 91精品国产综合久久婷婷香蕉| 国产精品私房写真福利视频| 日本网站在线观看一区二区三区| 99精品欧美一区二区蜜桃免费| 日韩一区二区视频在线观看| 一区二区三区四区在线免费观看| 精品一区二区三区在线播放视频 | 亚洲国产wwwccc36天堂| 国产成人午夜电影网| 欧美日韩国产高清一区| 亚洲免费av网站| 国产a视频精品免费观看| 91精品国产乱码| 一区二区久久久久久| 不卡一区二区在线| 日韩欧美电影一二三| 亚洲一区二区三区四区在线观看| 国产激情精品久久久第一区二区| 欧美理论在线播放| 亚洲精品视频在线看| 成人污视频在线观看| 久久久久久久久久看片| 美女尤物国产一区| 欧美一区二区在线观看| 亚洲成av人片一区二区三区| 一本一本大道香蕉久在线精品| 国产精品灌醉下药二区| 国产一区二区三区四 | 欧美日韩一区三区四区| 亚洲免费在线视频一区 二区| 高清在线不卡av| 国产欧美一区二区三区鸳鸯浴 | 99久久久精品| 国产精品国产三级国产普通话蜜臀| 激情小说欧美图片| 久久青草欧美一区二区三区| 久久国产精品99精品国产|