Lets say I have the following strings
a = "123456"
b = "#$%[{\"
c = "ABCDEFG"
I need to convert these three string into a "d" string with the following properties
- The "d" string is obfuscate (it does not need to be encrypted)
- The "d" string can be converted into the a,b,c string (it is reversible)
- The "d" string should be fast to compute
- The "d" string should be as short as possible
So far what I do is something like this
d = a+"|"+b+"|"+c
d = base64.encode(d)
So far this accomplishes the first three requirements, but not the third one, as base64 tends to make strings pretty big.
I have been also looking at other solutions
- Use XOR encryption
- Consider using CRC32 as some questions (Reversing CRC32) states that it might be possible to revert it, however, I am not sure about it.
Finally note that the "obfuscation" part is done by python and the "restoration" part is done by php.
Any ideas?