Hey all,

I have a little problem here.. i need to encrypt a 4 character string and be able to decrypt it later on. The result may not be longer as 8 characters so i cant use md5.. anyone has a good idea?

Example:

$str = \'Que1\'
some cloud of code
echo $str --> some crap
some cloud of code
echo $str --> Que1

I know its possible to mess around with chars myself but it must not look logical to someone.. a mega encryption is not needed..

Jordy Querner

    If I was you, I'd write my own encryption/decryption functions. Probably the only way you're gonna be able to meet your needs, plus it wouldn't be that hard for you to do/figure out.

      Josh.. i was thinking the same when i readed my msg again.. i know its not hard .. not at all.. but i hate to invent the wheel again.. i hoped there was some sort of function for this ..

      Thnxz for the post 🙂

      Jordy Querner

        It's one of those things you just toss off at the wrist, so to speak 🙂

        First thing I thought - four random chars, XOR them with the four chars of the msg, then interleave the random and XORed chars.

          Write a Reply...