There is a field in one of my tables that is encrypted using
ENCRYPTBYPASSPHRASE(<passphrase>,<value>)
When the value is placed into the object the field is still encrypted so I can't do anything with it. I can't create a view or stored proc or any other item that decrypts the fields on the database because then it defeats the purpose of encrypting the fields. Is there a way of having the frame work run something like
DECRYPTBYPASSPHRASE(<passphrase>, <columnName>)
before assigning the value to the object?
Right now I'm Getting the data then calling ExecuteQuery to decrypt the value. and assigning that new value over the encrypted value on my data model class. It works but I was just wondering if it could be done automatically through some options I don't know about. I've tried searching but have not found anything.
passPhraseand the type to convert the clearvarbinarytoo, or do you want to retrieve abyte[]?