Hello,
I wrote an user profile plugin, which allows users to input sensitive data. At first I learned that in my case it is not possible to encrypt it on database level because the data is stored in #__user_profiles , profile_value as VARCHAR and it looks it only works with VARBINARY fields. But this statement can be false, because I have no experience with this topic.
As next, I looked up how Joomla can help me. I searched the codebase and the web and I did this for hours. But to be honest, I am/was lost. Found JCrypt and JCryptCipher but there are no docs which helps coders who are not experienced with this topic. I implemented the JCryptCipher Interface in my plugin and added the scaffold of the 3 methods encrypt() decrypt() and generateKey(). But I really not got what to do exactly in this methods. My fault :-)
I not quit and wrote instead then the code with the help from the php.net examples. It works, I can encrypt the data (ATM with MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC) before I store it in the database and decrypt it when the user edits again the profile. But I did this stuff the first time and so it cannot be good practice.
I hope someone has some real world code from an up to date extension, or at least can me guide a little how to do this in the Joomla way. Every bit of help is appreciated.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-cm...@googlegroups.com.To post to this group, send an email to joomla-...@googlegroups.com.