Смекни!
smekni.com

Высокоуровневые методы информатики и программирования (стр. 6 из 6)

//////////////////////////////Txt[I] IN Cont{['À'..'ß', '¨']} Then:=Key[J];:=KeyR(SG1, Ch, 0) ; // Èùåìíîìåðñèìâîëàêëþ÷àâñòîëáöå:=Txt[I]; //REd2.text[I];

B:=KeyS(SG1, Ch, A) ; // Èùåì íîìåð ñèìâîëà òåêñòà â ñòðîêå " Main "

//REd1.Text:=REd1.Text+Znak(SG1, B, 0);:=Oyt+Znak(SG1, B, 0);J<=Length(Key)-1 Then J:=J+1 ELSE J:=1; //ÏåðåáîðÊëþ÷àELSE:=Txt[ I ];

//REd1.Text:=REd1.Text+Ch;:=Oyt+Ch;;

//////////////////////////////;.Lines.Add(Oyt);;.Enabled:=True;.Enabled:=True;.Enabled:=True;.Enabled:=True;.Enabled:=True;.Enabled:=True;;TForm1.SB7Click(Sender: TObject);// Óäàëèòüâñ¸REd1.Lines.Count>0 Then REd1.Clear;REd2.Lines.Count>0 Then REd2.Clear;.Enabled:=False; SB1.Enabled:=False;.Enabled:=False; SB4.Enabled:=False;.Enabled:=False;.Panels[0].Text:='';.Panels[1].Text:='';;TForm1.SB3Click(Sender: TObject);

begin.Title:='Îòêðûòü èñõîäíûé òåêñò ...';

IF OD1.Execute Then.Panels[0].Text:=ExtractFileName( OD1.FileName );:=OD1.FileName;.ProcessMessages(); //.FileName:=Old1;.Lines.LoadFromFile( Old1 );; ShowMessage('Íåòäîñòóïàê: '+Old1);.Panels[0].Text:=''; SD1.FileName:='';;.FileName:='';;;TForm1.SB5Click(Sender: TObject);

begin.Title:='Îòêðûòü øèôðîâàííûé òåêñò ...';

IF OD1.Execute Then.Panels[1].Text:=ExtractFileName( OD1.FileName );:=OD1.FileName;.ProcessMessages(); //.Lines.LoadFromFile( Old2 );; ShowMessage('Íåòäîñòóïàê: '+Old2);.Panels[1].Text:='';;.FileName:='';;;TForm1.N3Click(Sender: TObject);.Visible:=Not SG1.Visible;;TForm1.N4Click(Sender: TObject);

begin('Ëîãâèíîâ Ì.Þ 313ÏÈ Êóðñîâàÿ íà òåìó:"Øèôðîâàíèå Âèæèíåðà" 2012');

end;TForm1.SB4Click(Sender: TObject);

Label 0;.Title:='Ñîõðàíèòü Èñõîäíûé òåêñò êàê ...';

IF SBar1.Panels[0].Text='' Then

: IF SD1.Execute Then:=SD1.FileName;.ProcessMessages();.Lines.SaveToFile( Old1 );.Panels[0].Text:=ExtractFileName( Old1 );;ELSEMessageBox(Handle, PChar( 'Åñëèõîòèòåèñïîëüçîâàòüèìåþùèéñÿïóòü'+

#13+'"'+Old1+'"'+

#13' Íàæìèòå " Äà ".' ), 'Ñîõðàíåíèå', _YESNO+MB_ICONINFORMATION)=MrYes Then.Lines.SaveToFile(Old1) ELSE GoTo 0;

//SBar1.Panels[0].Text.FileName:='';;TForm1.SB6Click(Sender: TObject);

Label 1;.Title:='Ñîõðàíèòü Çàøèôðîâàííûé òåêñò êàê ...';

IF SBar1.Panels[1].Text='' Then

: IF SD1.Execute Then:=SD1.FileName;.ProcessMessages();.Lines.SaveToFile( Old2 );.Panels[1].Text:=ExtractFileName( Old2 );;ELSEMessageBox(Handle, PChar( 'Åñëèõîòèòåèñïîëüçîâàòüèìåþùèéñÿïóòü'+

#13+'"'+Old2+'"'+

#13' Íàæìèòå " Äà ".' ), 'Ñîõðàíåíèå', _YESNO+MB_ICONINFORMATION)=MrYes Then.Lines.SaveToFile( Old2 ) ELSE GoTo 1;

//SBar1.Panels[0].Text.FileName:='';;TForm1.LokBut(Sender: TObject);// ÏðîâåðêàòåêñòîâûõïîëåéREd1.Lines.Count>0 Then.Enabled:=True;.Enabled:=True;ELSEREd1.Lines.Count<=0 Then.Enabled:=False;.Enabled:=False;;REd2.Lines.Count>0 Then.Enabled:=True;.Enabled:=True;ELSEREd2.Lines.Count<=0 Then.Enabled:=False;.Enabled:=False;;(REd1.Lines.Count>0)OR(REd2.Lines.Count>0)Then SB7.Enabled:=True ELSE.Enabled:=False;.Caption:=Format('Òàáëèöà- [R=%d, C=%d]',

[SG1.RowCount, SG1.ColCount]);

// ÌÅÒÎÄÛÄËß" STRINGGRID "DelCol(SG: TStringGrid);I, J :LongInt;// ÓäàëèòüêîëîíêóSG do:= ColCount - 1;[ J ].Clear;I:=J to ColCount - 2 do[ I ].Assign( Cols[ I+1 ] );:= ColCount - 1;;;DelRow(SG: TStringGrid);I, J :LongInt;// ÓäàëèòüñòðîêóSG do:= RowCount - 1; // Ïîñëåäíÿÿñòðîêà[ J ].Clear;I:=J to RowCount - 2 do[I].Assign( Rows[ I+1 ] );:= RowCount - 1;;;InsRow(SG: TStringGrid);// ÂñòàâêàñòðîêèSG do:= RowCount + 1;;InsCol(StrGrid: TStringGrid);// Âñòàâêàêîëîíîê.ColCount := StrGrid.ColCount + 1;;TForm1.SpeedButton1Click(Sender: TObject);

begin // Äîáàâèòü Ñòðîêó äëÿ ñèìâîëîâSG2.RowCount<256 Then

begin( Sg2 );( Sg1 );( SG1 );ELSE Beep;;TForm1.SpeedButton2Click(Sender: TObject);

begin // Óäàëèòü Ñòðîêó äëÿ ñèìâîëîâSg2.RowCount>33 Then

Begin( Sg2 );( Sg1 );( SG1 );ELSE Beep;

end;.

Ïðèëîæåíèå Á

êðèïòîãðàôè÷åñêèé øèôðîâàíèå âèæåíåð ïîëèàëôàâèòíûé

Ñêðèíøîòû ïðîãðàììû

Ïðèëîæåíèå Â

Êâàäðàò Âèæåíåðà (tabula recta)

ABCDEFGHIJKLM NO PQR STU VW XYZAABCDEFGHIJKLM NO PQR STU VW XYZBBCDEFGHIJKLM N O PQRSTUV W X YZACCDE FGHIJKLM NO PQR STU VW XY ZABDDEFGHIJKLM N O PQRSTUV W X YZABCEEFGHIJKLM NO PQR STUVW XY ZABCDFFGH IJKLM N O PQRSTUVW X YZABCDEGGHI JKLM N O PQRSTU VW XY ZABCDEFHHIJKLM N O PQRSTUV W X YZABCDEFGIIJKLM NO PQR STUVW XYZABCDEFGHJJKLM NO PQRSTUVW XYZABCDEFGHIKKLM N O PQRSTU VW XYZABCDEFGHIJLLM NO PQRSTUV W X YZABCDEFGHIJKMM N O PQRSTU V W X Y ZABCDEFGHIJKLNN O PQRSTU V W X YZABCDEFGHIJKLMOO PQRSTU V W XY ZABCDEFGHIJKLM NPPQR STUV W X YZABCDE FGHIJKLM N OQQRSTU V W X Y ZABCDEFGHIJKLM NO PRRSTU V W X Y ZABCDE FGHIJKLM N O PQSSTUV W XY ZABCDEFGH I JKLM NO PQRTTU VW X YZABCDEFGHI JKLM N O PQRSUU V W X Y ZABCDEFGH I JKLM NO PQRSTVV W XY ZABCDE FGHI JKLM N O PQRSTUWW X YZABCDEFGHIJKLM N O PQRSTU VXX Y ZABCDEFGHIJKLM N O PQRSTUV WYY ZABCDEFGH IJKLM NO PQRSTUVW XZZABCDEFGHI JKLM N O PQRSTUVW X Y