wesselj1 / Cryptaroo_iOS

Cryptaroo for iOS
GNU General Public License v2.0
0 stars 0 forks source link

Spacing of ciphertext not preserved #1

Open Kerredai opened 8 years ago

Kerredai commented 8 years ago

When using several tools in Cryptaroo, including the affine cipher tools, the output text doesn't use the spacing of the input text but breaks the text into blocks of five letters. This breaks up decrypted words and makes them kind of hard to read.

wesselj1 commented 8 years ago

Hey @Kerredai. Sorry for a late reply.

Breaking up cipher text into blocks of 5 is pretty common to prevent a transposition error when working with them by hand. The breaking up of the text was not really my decision, but that of the developer who created the initial Java application. I did however rewrite that code in Objective-C/C++. While I do agree with the initial code author's blocking of the text, I see your point. However, the crypto functions strip all spaces, digits, and special characters from the strings before they do the encryption or decryption. I suppose it is possible to preserve the white spacing. I'll look in to that and see what I can come up with. Perhaps I can add it as a setting or something so users can flip it off and on however they choose, and maybe even choose their own block sizes.