So I followed this guide here http://www.kodyaz.com/articles/sql-server-2005-database-encryption-step-by-step.aspx on how to setup encryption for my DB. All went fine on that side.
I'm trying to get some of the data that has been encrypted to be displayed now. I'm able to call data that is un-encrypted fine but I cannot seem to work out how to use the symmetric key to decrypt the encrypted data and display on the page.
Originally I thought I should use a stored procedure and let that catch the values but not entirely sure how to implement it.
echo "This is the database userId field: " . $row->userId . "<p>";
echo "This is the database email field: " . $row->email . "<p>";
echo "This is the database encryptedpassword2 field: " . $row->encrypteddata . "<p>";
This is how I am calling data but unsure on how to get the encrypteddata field to be passed through my key and then be displayed. At the moment it just shows random characters.
I'm somewhat new to SQL encryption so I hope I've managed to explain myself somewhat okay.
Thanks