Total members 11793 |It is currently Thu Aug 22, 2019 9:30 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





i want code hill cipher C++ Decrypt
cpp code
void main()
{
char c[10]={0},p[10],d[10]={0};
int i,l,k;
clrscr();
printf("Enter msg:");
gets(p);
printf("\n");
printf("Enter keysize:");
scanf("%d",&k);
puts(p);
for(i=0;i<10;i++)
{
if(p[i]>=65 && p[i]<=96)
{
c[i]=((p[i]-65+k)%26)+65;
}
else if(p[i]>=97 && p[i]<=122)
{
c[i]=((p[i]-97+k)%26)+97;
}
}
printf("\n");
puts(c);
for(i=0;i<10;i++)
{
if(c[i]>=65 && c[i]<=96)
{
if((c[i]-65-k)<0)
{
d[i]=c[i]-k+26;
}
else
{
d[i]=((c[i]-65-k)%26)+65;
}
}
else if(c[i]>=97 && c[i]<=122)
{
if((c[i]-97-k)<0)
{
d[i]=c[i]-k+26;
}
else
{
d[i]=((c[i]-97-k)%26)+97;
}
}
}
printf("\n");
puts(d);
getch();
}





Author:

updated.


Author:
Mastermind
User avatar Posts: 2707
Have thanks: 74 time
Post new topic Reply to topic  [ 2 posts ] 

  Related Posts  to : code hill cipher C++ Decrypt
 decrypt using the playfair cipher     -  
 playfair cipher assembly code     -  
 polyalphabetic cipher java code     -  
 Ceasar encryption-decryption-cipher-decipher code     -  
 Encryption and Decryption encryption Affine cipher code     -  
 Columnar Cipher & Playfair Cipher     -  
 Encrypt/Decrypt a file from source file to target file.     -  
 playfair cipher     -  
 Playfair Cipher technique     -  
 Polyalphabetic cipher technique     -  



Topic Tags

C++ Algorithms






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com