Hi all,
I'v been coding myself a little program for a while now, which uses a lot of different encryption algorithms and salts, of which some i coded myself, in a random order. This works like a gem, when it runs in Netbeans, but once i compile it to a .jar file, and try it, it breaks. (encrypted text cannot be fully decrypted, and some of the letters are unreadable).
This is what i deducted so far:
* All the encryption algorithms separately are working perfect. They can be stored in a string object, and decrypted from there again, without problem.
* All the binary encryptions (aes, twofish, serpent etc) work perfectly, even after compiling
My guesses: when encrypting a character with xor, cesar, etc, there might be this problem:
char: 0101 1001
pass: 1100 1011 xor
result:1001 0010
some char encodings don't use the first bit of the byte, therefor resulting in a different char then intended.
Some other info about my code:
To get a random order of encryptions and salts, a randomizer makes a random order of 4 encryptions. Each of those has a binary number (00, 01, 10 and 11), which is put in that order into a char, that is added in the string, after applying those encryptions/salts. (again, the problem with the first bit might apply here as well, if that is the problem)
I think the problem might be that the standard charset in Netbeans might not be the same as in Windows (for example UTF-8 vs EBCDIC) and that the Java virtual machine uses the charset of Windows, once the program is compiled.
Does anyone have an idea of what the problem might be and how to solve it?
Thanks in advance,
PidgeyL