Pages

Friday, February 19, 2016

Program for password decryption using Caesar cipher. (Receiver side)

Caesar Cipher Decryption


//Program for password decryption using Caesar cipher. (Receiver side)
#include<stdio.h>
#include<string.h>
int main()
{
 char password[20];
 int i, len=0;
 
 printf("Enter your encrypted password:");
 scanf("%s",password);
 
 len = strlen(password);
 printf("Your decrypted password is: ");
 
 for(i=0; i<len; i++)
  printf("%c",password[i]-3); 
 
 return 0;
}

Output of the program
Enter your encrypted password:DEFG Your decrypted password is: ABCD
 




2 comments: