123 Eng

Engineering the engineers™


Latest Jobs   Forum Map

 


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)  
 

 
ENCRYPTION & DECRYPTION OF FILE(CRYPTOGRAPHY)

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

Description : The encryption program converts a DAT file into BMP file with
a password.Then decryption is done by adding e wtih bmp file name and
opened with password.The decrypted file can be found using(func)type
defilename.

D:dosbasedTURBOC>encrypt
enter file name to encrypt
test.dat
enter password[ space to end ]
******
D:dosbasedTURBOC>decrypt
enter file name to decrypt
etest.bmp
enter password[ space to end ]
******
D:dosbasedTURBOC>type test.dat
The dawn of a new PC era.
The first 64-bit processor -G5.

D:dosbasedTURBOC>type detest.dat
The dawn of a new PC era.
The first 64-bit processor -G5.
D:dosbasedTURBOC>

Encrypted file: etest.bmp


/* Encryption Program */
#include<stdio.h>
#include<string.h>
char map1[]=<BR>aeiostbcdfghjklmnpqruvwxyz0123456789AEIOSTBCDFGHJKLMNPQRUVWXYZ ";
char map2[]=<BR>otsiaehfbdgclnjkmuypzqvwxr4697081325OTSIAEHFBDGCLNJKMUYPZQVWXR ";
void main()
{
char fn[20],m1,m2,tfn[20],p1[10]; FILE *f1,*f2;
int i=0,j=0,flag=0,l,a,k;
printf("
enter file name to encrypt<BR>);
scanf("%s",fn);
f1=fopen(fn,"r");/* OPENS SOURCE FILE */
if(f1==NULL){ printf("
cannot open file"); exit(0); }
printf("
enter password[ space to end ]<BR>);
while((int)(m1=getch())!=32)
{ printf("*"); p1[i]=m1; i++; }
p1[i]='

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

 

 

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