Anda di halaman 1dari 4

Encryption And Decryption Project In C++

i will tell you my idea about my project.

i want to make the encryption and decryption project in c++ only.

this the main requirement and then in that it should have some gui or you can use some sdk
programming also it has to be run in only Microsoft visual c++ 6.0. project must be two level security
means in encryption when we enter any string/text it should be converted by using first algorithm then
after that it should again take that algo.

output and then convert that to some other output by using some other algorithm. and in this both
algorithm one algorithm must be of convert string into image file and it should be decrypted also.

in decryption we want some password authentication then that person should do the decryption. In
decryption also we must have two level of decryption you can take reverse level of encryption .

in this project my main motive is to use as many features of c++ and present it.this my project idea.

so please kindly reply as soon as if it is possible to you and what is your cost for this project.

i tell you previously only i am student and i am not working also.

so seeing that aspects tell your cost. waiting for your reply..........

Encryption-Decryption

#include<stdio.h>

void main()

FILE *fp,*fp1;

int choi;

char name[20],temp[20]={"Temp.txt"},c;

clrscr();
printf("

Press 1 to Encrypt:

Press 2 to Decrypt");

printf("

Enter your Choice:");

scanf("%d",&choi);

switch(choi)

case 1:

printf("Enter the filename to Encrypt:");

scanf("%s",name);

fp=fopen(name,"r+");

if(fp==NULL)

printf("The file %s can't be open",name);

getch();

exit();

fp1=fopen(temp,"w+");

if(fp1==NULL)

printf("The file Temp can't be open");

getch();

exit();
}

c=fgetc(fp);

while(c!=EOF)

fputc((c+name[0]),fp1);printf("%c",c+name[0]);getch();

c=fgetc(fp);

fclose(fp);

fclose(fp1);

remove(name);

rename(temp,name);

printf("The file is Encrypted:");

getch();

break;

case 2:

printf("

Enter the Filename to Decrypt:");

scanf("%s",name);

fp=fopen(name,"r+");

fp1=fopen(temp,"w+");

c=fgetc(fp);

while(c!=EOF)

fputc(c-name[0],fp1);

c=fgetc(fp);
}

fclose(fp);

fclose(fp1);

remove(name);

rename(temp,name);

printf("The file is decrypted:");

getch();

Anda mungkin juga menyukai