M
Martin Gregorie
Martin said:So would using a hexadecimal representation of each byte.["(e-mail address removed)" <[email protected]>] | Hi,
I just need a simple way to encrypt/decrypt a string, main purpose
is, making it not readable by human eye, any hints on this? thanks,
if you just want to obfuscate it so the string can't be read casually,
base64-encoding it should do.
I can read that without too much trouble; I don't think I'm alone. A
simple, reversible, and undocumented bit of arithmetic (say, XORing with
some randomly chosen 16-bit quantity) would obfuscate things much more
effectively. If you need the result to be ASCII, then base64 or
hexadecimal on the result would work fine for that.
Sure - we can read it but non-programmers probably can't, and if it used
the added noise of HTML notation ( ....) I'd have to be more
than casually interested to try.
The OP did say "obfuscation to prevent casual reading", so almost
anything will do, including converting the bytes into a comma separated
list of integer values.
I agree, though that XORing or ROT13 would be better.