Hi guys,

I am working on an encryption/decryption vigenere cipher at present. Ive been reading and writing to text files using integer arrays and then modding them together in order to get the full ASCII character set.

the problem i am facing is, when i am encrypting, the spaces dissapear which is brilliant, but when im decrypting the message, using the same key, i get the plaintext back but the spaces are symbols :(

An example is shown below:

Due§to$this­Æxample

It should decrypt back to the message:

Due to this Example

Any ideas how i can get the spaces back? a space i think is ASCII value 32 if that helps.

Thanks in advance

Could you please provide the code that dictates the decryption? I would normally ask only for certain parts of code, but I would need to see the whole thing to figure out where it's messing up.

That is, unless, you've pin-pointed to the specific spot in the algorithm where the ASCII values are getting messed up.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.