e; .Free; .Free; ( Файл успішно розшифрований , mtInformation, [mbOK], 0); ( Помилка ввода/выводаraquo;,mtError,[mbOK],0);;;.Text:=laquo;raquo;;.Text:=laquo;raquo;;.Enabled:=False;;
procedure TForm1.ComboBox1Change (Sender: TObject);
beginComboBox1.Text= Зашифрувати then.Caption:=laquo;Зашифроватьraquo;.Caption:=laquo;Расшифроватьraquo;;;.ShifrMessage;, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms ,, StdCtrls, Wcrypt2;=class (TForm): TLabel ;: TButton ;: TMemo ;: TButton ;: TMemo ;: TButton; Button3Click (Sender: TObject); FormCreate (Sender: TObject); FormClose (Sender: TObject; var Action: TCloseAction); Button1Click (Sender: TObject); Button2Click (Sender: TObject);
{Private declarations}
{Public declarations} ;: TForm2 ;: String= Пароль raquo ;;: HCRYPTPROV ;: TMemoryStream;
{$ R * .dfm} TForm2.Button3Click (Sender: TObject);
begin.Close ;;
procedure TForm2.FormCreate (Sender: TObject);
begin (@ Prov, nil, nil, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT);:=TMemoryStream.Create ;;
procedure TForm2.FormClose (Sender: TObject; var Action: TCloseAction);
begin.Free; (Prov, 0) ;;
procedure TForm2.Button1Click (Sender: TObject);
var: HCRYPTHASH ;: HCRYPTKEY ;, DataLen: DWORD ;: String;.Enabled:=false;.Enabled:=true;(Prov,CALG_SHA,0,0,@Hash);(Hash,PByte(Password),Length(Password),0);(Prov,CALG_RC2,Hash,0,@Key);.Clear;.WriteBuffer(Pointer(mmIn.Text)^,Length(mmIn.Text));:=Length(mmIn.Text);:=Length(mmIn.Text);(Key,0,true,0,nil,@BufLen,0);.SetSize(BufLen);(Key,0,true,0,PByte(Stream.Memory),@DataLen,BufLen);(Str,BufLen);.Seek(0,soFromBeginning);.ReadBuffer(Pointer(Str)^,BufLen);.Text:=Str;(Key);(Hash);;
procedure TForm2.Button2Click (Sender: TObject);
var: HCRYPTHASH ;: HCRYPTKEY ;: DWORD ;: String;.Enabled:=false;.Enabled:=true;(Prov,CALG_SHA,0,0,@Hash);(Hash,PByte(Password),Length(Password),0);(Prov,CALG_RC2,Hash,0,@Key);:=Stream.Size;(Key,0,true,0,PByte(Stream.Memory),@DataLen);(Str,DataLen);.Seek(0,soFromBeginning);.ReadBuffer(Pointer(Str)^,DataLen);.Text:=Str;(Key);(Hash);;.