This will allow you to encrypt private messages to other users. The user will then be able to decrypt the message if they know the password that you used. This prevents any sensitive message from being read by somebody looking at the raw database records.
Decryption happens onscreen - not within the database. So, even if you "decrypt" a message (and read it) it is still stored on the server in its encrypted form.
If you've decrypted a message and quote it back to the sender, it will be the decrypted text that is quoted back. The quote must, itself, be manually encrypted or else it will be sent back to the original sender in plain text.
Once a message is encrypted and submitted and in the sender's Outbox, it may be viewed and deleted, but it cannot be edited.
This hack encrypts private messages using a 256-bit Rijndael block cipher.
NOTE: In order to use this hack, you must have PHP compiled with libmcrypt2.4.x or higher!
Author: Jason Bassford
December 10, 2003
October 20, 2004