954,498 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Confusion in string handling?

I am working on a program for encryption & decryption using SDES Algo. This Algo. takes a key of 10-bit length and input plaintext of 8-bits length and produces a ciphertext of 8-bits length. I have collected the key in an array of char (char key[11]) and plaintext as unsigned char (8-bit), then i have converted this plaintext to string (plaintext="11010011").
After this i have defined all the methods used for SDES like EX-OR, Circular sift,
SBOX, etc. all these methods work on string of plaintext.

The problem is that when i remove some printf() from my code, the program just crashes out. I have used lots of printf() to check the current plaintext string.
But if i donot remove the printf()'s it works great.(But takes more time to compelte)

I realy donot understand whats goin on.

Please Help me in some way.
Thankyou..

letmec
Light Poster
33 posts since Sep 2004
Reputation Points: 10
Solved Threads: 2
 

Put all your printf() back in, take out one at a time and then you'll know exactly where the problem is.

Tight_Coder_Ex
Posting Whiz in Training
215 posts since Feb 2005
Reputation Points: 47
Solved Threads: 17
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You