Is it possible, to transform a crypted string (similar to md5), without loosing the ability of decoding it back again?
0TJyj0wX4ZCrsYlANG8QgwBHnGzGU7kr1BEkolr6tY0OdowpA==
Better: 73a4842f36b4n237m64as23
Is it possible, to transform a crypted string (similar to md5), without loosing the ability of decoding it back again?
0TJyj0wX4ZCrsYlANG8QgwBHnGzGU7kr1BEkolr6tY0OdowpA==
Better: 73a4842f36b4n237m64as23
A hash is, by definition, one-way. You would not be able to hash your crypted string and then "un-hash" it to obtain the crypted string again.
You can, however, attempt to "minify" the crypted string by:
Best way to encrypt in PHP is by using the Mcrypt extension. http://www.php.net/manual/en/book.mcrypt.php
Example for encryption and decryption.
I do recommend also to base64 encode the result of encryption.
Minification does not make sense for small data (ex. passwords).