I am using both the Private Message module and the Encrypt modules. I can of course create a field which is encrypted, but it looks like I must alter the PM module since its storage in the database is not encrypted. Isn't exactly private then is it. Permissions are not enough to make it a Private Message.
I assume I will need to add the Encrypt code directly to the module itself. Does anyone have any idea where I would add it and how?
Thanks
I've done something similar before to store encrypted images directly in the DB (for passport photos).
I've just had a quick look at the private messages module and it looks like you'll need to modify the main .module file. Search though it for db_insert. At around line 1836 is the bit that saves the message to the db.
If you add:
before the line:
Then that will handle the encryption.
Then you need to find where it gets back out the DB and put the decryption function in there.