very simple encryption

M

Martin Gregorie

Martin said:
["(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.
So would using a hexadecimal representation of each byte.

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.
 
B

Bjorn Borud

[rossum <[email protected]>]
| >
| >I agree, though that XORing or ROT13 would be better.
| I have seen ROT13(Base64(plaintext)) used in some cases. Simple and
| reasonably effective against "casual" reading, though in my case I
| just added a "ROT13" button to my Base64 encoder/decoder.

I guess it depends on how "casual" we are talking and whether the
target audience includes Rain Main or not.

-Bjørn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,796
Messages
2,569,645
Members
45,371
Latest member
TroyHursey

Latest Threads

Top