[eluser]PhxVyper[/eluser]
This is a problem though when you are trying to compare a value submitted (not encrypted) with a value encrypted in a field in a database.
This one particular project I'm working on deals with HIPAA, so I must encrypt specific fields (while still making the data in those fields accessible/decryptable for future use).
For example:
1. I encrypt an email address and store that email in the database.
2. User enters email address in a form
3. I want to perform a lookup to determine if email exists in database.
This means I have to be able to encrypt the email address provided by the user and perform a SELECT against the table to determine if email record exists with a matching encrypted string.
Now, I would say that there is a quick solution by storing the init. vector value, but since I have multiple fields that I must encrypt, then this becomes problematic.
So, at this point, does anyone have a good idea on how I can work around this issue?