Warning: include(topsc.html): failed to open stream: No such file or directory in /home/eng123/public_html/sourcecode/c/unix/crytography.html on line 13

Warning: include(topsc.html): failed to open stream: No such file or directory in /home/eng123/public_html/sourcecode/c/unix/crytography.html on line 13

Warning: include(): Failed opening 'topsc.html' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/eng123/public_html/sourcecode/c/unix/crytography.html on line 13

Home
Source Codes
Engineering Colleges

Training  Reports
Seminar Reports
Placement Papers

Forums

   Computer Science / IT
   Electronics
   Electrical
   Mechanical
   Chemical
   Civil

   CAT / MBA

   GMAT / Foreign MBA
Latest Jobs

Engineering Jobs / Technical Jobs
Management Jobs

Sitemap
Terms of use

Displaying  Source Code(s)  
 


Warning: include(adsc.html): failed to open stream: No such file or directory in /home/eng123/public_html/sourcecode/c/unix/crytography.html on line 31

Warning: include(adsc.html): failed to open stream: No such file or directory in /home/eng123/public_html/sourcecode/c/unix/crytography.html on line 31

Warning: include(): Failed opening 'adsc.html' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/eng123/public_html/sourcecode/c/unix/crytography.html on line 31

 
cryptography in c on linux

--------------------------------------------------------------------------------

Description : This program takes a text file from guest file and encrypts it.to retain the original text redo the same code.you can make the algorithm more abstruse.try it.for example as key ,which here is taken as i=i+2.you can take a song(dat file) converted to text file.or you can first invert the source text then encrypt.



#include<stdio.h>
int main()
{unsigned long int i=0;
char ch;
char name1[20],name2[20];
FILE *fp,*ft;
printf("ENTER THE SOURCE FILE:");
gets(name1);
printf("ENTER THE DESTINATION FILE:");
gets(name2);
fp=fopen(name1,"r");
ft=fopen(name2,"w");
if(fp==NULL)
{printf("CAN,T OPEN THE FILE");
}
while(!feof(fp))
{ch=getc(fp);
ch=~((ch^i));
i+=2;
if(i==100000)
{i=0;
}
putc(ch,ft);
}
fclose(fp);
fclose(ft);
return 0;
}

 

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved copyright 123ENG