9. Implement data encryption and data decryption #include #include #include void main() { int i,ch,lp; char cipher[50],plain[50]; char key[50]; while(1) { printf("\n.....MENU....\n"); printf("\n 1.Data Encryption\t \n \n 2.Data Decryption\t \n \n3.exit"); printf("\n Enter your choice:"); scanf("%d",&ch); switch(ch) { case 1:printf("\n Data Encryption"); printf("\n Enter the plain text"); fflush(stdin); scanf("%s",plain); printf("Enter the encryption key:"); scanf("%s",key); lp=strlen(key); for(i=0;plain[i]!='\0';i++) cipher[i]=plain[i]^lp; cipher[i]='\0'; printf("\n The encrypted text is :"); puts(cipher); break; case 2: printf("\n Data Decryption"); for(i=0;cipher[i]!='\0';i++) plain[i]=cipher[i]^lp; printf("\n Decryption text is:"); puts(plain); break; case 3:exit(0); } } }