I have been looking for pros and cons in storing encrypted information in varchar and varbinary datatypes. From what I understand, varbinary may have an advantage with the amount of storage it requires to store the same information. Are there any other differences between the two datatypes that would make one preferable over the other for storing encrypted information?
Binary is probably easier, SQL Server's built-in encryption features return results as binary. Varchar may offer more options for searching, but typically you don't (or shouldn't) search encrypted data anyway.
I am encrypting the information before it reaches the database. Does that take away the easier part or are there other reasons apart from the built-in features that would make you say binary is easier? I would of thought that because varchar is human readable it would be the one that is easier to work with.
It doesn't really matter, if you're already encrypting it before it gets to the database. Frankly, you don't want encrypted data to be readable, and vice versa.