ify">// Расширениеключадлядешифрования (Source, Count, ExpandedKey, Dest);
// Дешифрування; DecryptAESStreamECB (Source: TStream; Count: cardinal; ExpandedKey: TAESExpandedKey128; Dest: TStream);: integer;, TempOut: TAESBuffer;: cardinal;: TStringStream;: = TStringStream. Create (''); Count = 0 then. Position: = 0;: = Source. Size; Count: = Min (Count, Source. Size - Source. Position); Count = 0 then exit; (Count mod SizeOf (TAESBuffer))> 0 thenEAESError. Create (SInvalidInBufSize); Count> = SizeOf (TAESBuffer) do: = Source. Read (TempIn, SizeOf (TempIn)); Done
// Висновок вхідного і вихідного блоків
FmStop. EditIn. Text: = IntToHex (TempIn [0], 2) + IntToHex (TempIn [1], 2) + (TempIn [2], 2) + IntToHex (TempIn [3], 2) + IntToHex (TempIn [4], 2 ) + (TempIn [5], 2) + IntToHex (TempIn [6], 2) + IntToHex (TempIn [7], 2) + (TempIn [8], 2) + IntToHex (TempIn [9], 2) + IntToHex (TempIn [10], 2) + (TempIn [11], 2) + IntToHex (TempIn [12], 2) + IntToHex (TempIn [13], 2) + (TempIn [14], 2) + IntToHex ( TempIn [15], 2);. EditOut. Text: = IntToHex (TempOut [0], 2) + IntToHex (TempOut [1], 2) + (TempOut [2], 2) + IntToHex (TempOut [3], 2) + IntToHex (TempOut [4], 2 ) + (TempOut [5], 2) + IntToHex (TempOut [6], 2) + IntToHex (TempOut [7], 2) + (TempOut [8], 2) + IntToHex (TempOut [9], 2) + IntToHex (TempOut [10], 2) + (TempOut [11], 2) + IntToHex (TempOut [12], 2) + IntToHex (TempOut [13], 2) + (TempOut [14], 2) + IntToHex ( TempOut [15], 2);
// FmStop;. Write (TempOut, SizeOf (TempOut));
. MemoOut. Text: = stt. DataString; Form1. RadioGroup1. ItemIndex = 1 then: = GetTickCount;. ProcessMessages; (GetTickCount-tick)> StrToInt (Form1.editDelay. Text);;: = Dest. Write (TempOut, SizeOf (TempOut)); Done : = stpath + ' DecodedFile' + stExt;. Caption: = FPath;;;; TForm1. Button2Click (Sender: TObject);, Dest: TFileStream;, DestFile: string;, Stop: cardinal;: integer;
Key: TAESKey128;// Довжина ключа і блоку 128 біт
SrcBuf, DstBuf: array [0 .. 16383] of byte;, DstSize: integer; Edit1. Text ='' then exit;
// Шіфрова...