kolibrios-gitea/programs/develop/libraries/crypt_des/trunk/about.htm
IgorA 0a833519d1 1) fix example
2) add documentation

git-svn-id: svn://kolibrios.org@3330 a494cfbc-eb01-0410-851d-a64ba20cac60
2013-03-05 10:14:38 +00:00

104 lines
2.8 KiB
HTML

<html>
<head>
<title>áèáëèîòåêà äëÿ øèôðîâàíèÿ ôàéëîâ ïî àëãîðèòìó DES</title>
<meta http-equiv="content-type" content="text/html; charset=WINDOWS-1251">
<style>
body
{
font-size: 15px;
font-family: "Bookman Old Style";
color: black;
text-align: justify;
}
h1 { color: green; font-size: 23px; }
h2 { color: green; font-size: 21px; }
h3 { color: green; font-size: 19px; }
h4 { color: #803f00; font-size: 17px; }
i { color: #0099cc; }
b { color: #0099cc; }
p {
text-indent: 1em;
margin-top: 3px;
margin-bottom: 2px;
margin-left: 0px;
margin-right: 0px;
}
ol, ul, dl{
margin-top: 3px;
margin-bottom: 2px;
}
pre
{
padding: 2px;
padding-left: 20px;
margin-top: 5px;
margin-bottom: 5px;
margin-left: 0px;
margin-right: 0px;
font-family: "Courier New";
font-size: 15px;
color: #004000;
background-color: #ffd0ff;
}
table { font-size: 15px; }
</style>
</head>
<body>
<h1>Îãëàâëåíèå</h1>
<ul>
<li>Âñòóïëåíèå</li>
<li><a href="#fun">Ôóíêöèè</a><br>
<ul>
<li><a href="#f_en">des_encryption</a></li>
<li><a href="#f_de">des_decryption</a></li>
<li><a href="#tabl_e">Òàáëèöà ýêñïîðòà</a></li>
</ul>
<h1>Âñòóïëåíèå</h1>
<p>Áèáëèîòåêà äëÿ øèôðîâàíèÿ ôàéëîâ ïî àëãîðèòìó DES (Data Encryption Standard) — ñèììåòðè÷íûé àëãîðèòì øèôðîâàíèÿ.</p>
<p>Äîêóìåíòàöèÿ îáíîâëÿëàñü 05.03.13.</p>
<h1><a name="fun">Ôóíêöèè</a></h1>
<h4><a name="f_en">des_encryption</a></h4>
<p>Ôóíêöèÿ øèôðîâàíèÿ ôàéëîâ. Ïðèìåð èñïîëüçîâàíèÿ:</p>
<pre>txt_key db 'des_2013',0
mem_key rb 120
...
mov eax,[open_file_size]
shr eax,3
stdcall [des_encryption], txt_key,mem_key,[open_file],eax</pre>
<p>ãäå:</p>
<p><b>txt_key</b> - âõîäíîé êëþ÷ 64 áèò</p>
<p><b>mem_keys</b> - ïàìÿòü äëÿ ôîðìèðîâàíèÿ 16 ïîäêëþ÷åé (ðàçìåð 120 áàéò)</p>
<p><b>[open_file]</b> - óêàçàòåëü íà ïåðâûé øèôðóåìûé 8 áàéòíûé áëîê</p>
<p><b>eax</b> - ÷èñëî áëîêîâ äëÿ øèôðîâàíèÿ (<i>[open_file_size]</i> - ðàçìåð ôàéëà)</p>
<h4><a name="f_de">des_decryption</a></h4>
<p>Ôóíêöèÿ ðàñøèôðîâûâàíèÿ ôàéëîâ. Ïðèìåð èñïîëüçîâàíèÿ:</p>
<pre>txt_key db 'des_2013',0
mem_key rb 120
...
mov eax,[open_file_size]
shr eax,3
stdcall [des_decryption], txt_key,mem_key,[open_file],eax</pre>
<p>ãäå:</p>
<p><b>txt_key</b> - âõîäíîé êëþ÷ 64 áèò</p>
<p><b>mem_keys</b> - ïàìÿòü äëÿ ôîðìèðîâàíèÿ 16 ïîäêëþ÷åé (ðàçìåð 120 áàéò)</p>
<p><b>[open_file]</b> - óêàçàòåëü íà ïåðâûé ðàñøèôðîâûâàåìûé 8 áàéòíûé áëîê</p>
<p><b>eax</b> - ÷èñëî áëîêîâ äëÿ ðàñøèôðîâàíèÿ (<i>[open_file_size]</i> - ðàçìåð ôàéëà)</p>
<h1><a name="tabl_e">Òàáëèöà ýêñïîðòà</a></h1>
<p>Ïðèìåð òàáëèöû ýêñïîðòà, ðàñ÷èòàííîé íà èñïîëüçîâàíèå ìàêðîñà <b>@use_library</b>:</p>
<pre>align 4
import_des:
des_encryption dd sz_des_encryption
des_decryption dd sz_des_decryption
dd 0,0
sz_des_encryption db 'des_encryption',0
sz_des_decryption db 'des_decryption',0</pre>
</body>
</html>