. , C/C++. , , .
, | |
20.10.2014 | |
24,7 K |
. ,
, , , , .
http://www.allbest.ru/
14
http://www.allbest.ru/
:
2009
C/C++ .
, C/C++. MS Visual C++ C++ Builder, DOS-, BC++ ++.
. .1.
http://www.allbest.ru/
14
http://www.allbest.ru/
.1
, :
;
;
;
.
#include<iostream.h>
#include<conio.h>
#include<fstream.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
void main(int argc, char **kluch)
{
clrscr();
cout<<"Key: "<<kluch[1];
ifstream in("E:\Input.txt");
ofstream out("Output.txt");
if(!in)
{
cout<<"\nThere is no filefor coding (Input.txt).";
cout<<"\n\nPres any key for exit.";
getch();
exit(1);
}
char temp,buf=NULL;
int n=strlen(kluch[1]);
int j,i=0;
for(int k=0;k<n; k++)
while(!in.eof())
{
in.read((char*)&buf,sizeof(buf));
if(buf==NULL)break;
j=fmod(i,n);
temp=buf^kluch[1][j];
out.put(temp);
i++;
buf=NULL;
}
in.close();
out.close();
cout<<"\nThe text is in a file Output.txt";
getch();
}
#include<iostream.h>
#include<conio.h>
#include<fstream.h>
#include<string.h>
#include<process.h>
#include<math.h>
void main()
{
char* kluch;
ifstream in("Output.txt");
ofstream out("Deshifr.txt");
if(!in)
{
cout<<"There is no file Output.txt";
getch();
exit(1);
}
cout<<"Enter a key: ";
cin>>kluch;
char temp,buf=NULL;
int n=strlen(kluch);
int j,i=0;
while(!in.eof())
{
in.read((char*)&buf,sizeof(buf));
if(buf==NULL)break;
j=fmod(i,n);
temp=buf^kluch[j];
out.write((char*)&temp,sizeof(temp));
i++;
buf=NULL;
}
in.close();
out.close();
cout<<"The decoded text is in the file Deshifr.txt";
getch();
}
-- , .
, .
, .
, , , , , .
.
-- , .
- , .
.
, .
, , , .
IV -- III (), , , , - .
-- , - , , , , , , -, -, -.
.
IV , , , .
, IV, , .
III , -, .
.
'-NU*-YT*`P**N'U-P`I--PN*IZId*I*U*-UI*T`IENTP*I*`IP''U`NT'*IGNz'P*-N`--P`T'ITNBP'N-'UUN*`P`*`^U~**`P-`--'P*`N*T**T`T`'EN*IYTUI'\U*N`IP*'*\U--`UI*`\U*-`N--N*P*IPZcP-IN--`U'T'N'I`U*N'U'P*-NU*^U~P-U--PTP`IP--UI*T---PI``'*XI**U`'-UIPP-N*`'*ZcUYIT*'`I'-T*'P`'IP''BP'*IUN*TZId*NTP'TNU-PI'TN-*N^U~UEN*`UP'@zP`I`*'*YT'`PIP**EN*I*UN*EN--*TIZcI'&UIT**I'9<TN*U*U\\XI'N`U'`UT*IU`PUN`PXI\U-'\UYP--U*'I`U*-IGdT*UI*`IP\U*ICP`*\U*YT*YTENEN*BP`*]`EN*D`YT*Y^U~*-*`T*UT'T**TN*^`P-*TP'**UT**T 8PP--IENTNN'N--PU*'\U-\U-*I`@P-IT*EN*IP--T--N'N*U'`U*T 8\UN'T-I*TP--``I*'ITTYTP`U`^U~T**I'9<TNT'--NU-I--U'*U-ENYYT*U-I'I-N`N'I--I--NUUGNzNUU*'U*``N-UT--`'`PP--TN*-U--*^
c++
-- , .
, .
, .
, , , , , .
.
-- , .
- , .
.
, .
, , , .
IV -- III (), , , , - .
-- , - , , , , , , -, -, -.
.
IV , , , .
, IV, , .
III , -, .
.
Allbest.ru
. . , . .
[556,8 K], 14.01.2013. . : , , , .
[923,6 K], 26.12.2011, . , , . .
[19,0 K], 30.04.2011( ""," ", ""). . , . .
[2,8 M], 27.02.2015, . 160 . . .
[163,1 K], 05.05.2016, DES (Data Encryption Standard). , . .
[1,7 M], 15.06.2013. . DES. . RSA.
[101,1 K], 09.03.2009. . . , . - .
[975,5 K], 11.06.2014; , . DES, .
[129,6 K], 17.02.2011. . . .
[863,0 K], 21.04.2012