[HELP PLEASE] C Encryption

divinemanwah's Avatar, Join Date: Jan 2008
Newbie Member
hello..
i made this simple program to encrypt a string to a file...
but i dont know how to decrypt it...
can anyone help?

Code:
#include <stdio.h>
#include <string.h>


main()
{
FILE *fp;
char enc[80];
int E[80], ctr, ctr2=0;

gotoxy(31,5); printf("Password Encryptor");
gotoxy(27,8); printf("Copyright WWW.ITSPOT.CO.NR");
getch();
clrscr();
gotoxy(5,3); printf("Enter the string to be encrypted: ");
gets(enc);

for(ctr=0;ctr<=strlen(enc);ctr++) {
	E[ctr2]=( (enc[ctr2]) - ( 0xFADA * enc[ctr2] ) ) /3;
	ctr2++;
}

fp = fopen("log\\pass.txt", "w+");



clrscr();
ctr2=0;
for(ctr=0;ctr<=strlen(enc);ctr++) {
	printf("%x",E[ctr2]);
	fprintf(fp, "%x", E[ctr2]);
	ctr2++;
}
gotoxy(5,3); printf("SUCCESS!! That's it...");

fclose(fp);
getch();

}
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Duplicate of [HELP PLEASE] C Encryption. Thread closed. Please do not create the same thread over and over again.