Could somebody advice me on subject “Simple encrypt/decrypt of utf-8 strings in php5 with secret key” ? Some advice on independant libraries?
(no dependancy on 32/64bit machines).
$encryptedTextUTF8 = simpleEncrypt($originalTextUTF8, $secret);
echo simpleDecrypt($encryptedTextUTF8, $secret); // outputs $originalTextUTF8
Using the mcrypt extension: http://us.php.net/manual/en/book.mcrypt.php
Something like the following could be feasible:
edit: Proven wrong, I suggest to remove the md5 part of the encryption. As to what is better, I do not know yet, but I’ll try to come update my post when I’ve had sufficient time investigating.. sorry! 🙂