ceasar cipher encryption program in c language

write a ceasar cipher code encryption in c language

Page 1 of 1

5 Replies - 28600 Views - Last Post: 19 December 2008 - 06:07 AM Rate Topic: -----

#1 madhulika_nandamuri   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 09-September 08

ceasar cipher encryption program in c language

Posted 09 September 2008 - 04:19 PM

Hi everybody.Anybody know how to write programs for ceasar cipher encryption,decryption,a C code that will encrypt a given text (of 20 characters) using XOR functions and
produces corresponding ASCII text. The code should be able to accept user inputs (both text and
key) and present the output in c language
Is This A Good Question/Topic? 0
  • +

Replies To: ceasar cipher encryption program in c language

#2 F!st!cuffs   User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 153
  • Joined: 15-July 08

Re: ceasar cipher encryption program in c language

Posted 09 September 2008 - 04:32 PM

View Postmadhulika_nandamuri, on 9 Sep, 2008 - 04:19 PM, said:

Hi everybody.Anybody know how to write programs for ceasar cipher encryption,decryption,a C code that will encrypt a given text (of 20 characters) using XOR functions and
produces corresponding ASCII text. The code should be able to accept user inputs (both text and
key) and present the output in c language


I'm sure that if I did maybe like 5 minutes research to find some info on ceasar cipher, c code, and XOR functions then yes I could. Dream.In.Code has this policy though that you have to show at least minimum effort. So spend a few minutes researching, try to write it yourself and if you still have problems come on back and we'll be glad to help
Was This Post Helpful? 0
  • +
  • -

#3 hymath123   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 16-November 08

Re: ceasar cipher encryption program in c language

Posted 18 December 2008 - 02:42 AM

try and try unti successssssssssss
ok na
Was This Post Helpful? 0
  • +
  • -

#4 hymath123   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 16-November 08

Re: ceasar cipher encryption program in c language

Posted 18 December 2008 - 03:00 AM

void encode ( void )
{
char buff[BUFSIZ];
int i = 0;
int shift_value;

printf( "Doing encrypt\n" );
printf("\nPlease enter the text you wish to encrypt: ");
fgets(buff, sizeof(buff), stdin);
if ("%s" > 'Z')
{
"%s" -= 'Z' - 'A';
}
printf("\nEnter your encryption shift value (anything from +-1 to 25): ");
scanf ("%i", &shift_value);



{
while ( buff[i] != '\0' )
{
buff[i] = buff[i] + shift_value;
i++;

}
}
printf("\n Your encrypted text is: %s \n", buff);
}
Was This Post Helpful? 0
  • +
  • -

#5 janotte   User is offline

  • code > sword
  • member icon

Reputation: 991
  • View blog
  • Posts: 5,141
  • Joined: 28-September 06

Re: ceasar cipher encryption program in c language

Posted 18 December 2008 - 07:36 PM

Please use the edit button to edit your post and wrap your code in the code tags
:code:
Was This Post Helpful? 0
  • +
  • -

#6 JackOfAllTrades   User is offline

  • Saucy!
  • member icon

Reputation: 6246
  • View blog
  • Posts: 24,014
  • Joined: 23-August 08

Re: ceasar cipher encryption program in c language

Posted 19 December 2008 - 06:07 AM

janotte, that's just partial code lifted off of another site. Don't pay it no mind :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1