Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Encrypt data in table

Author  Topic 

collie
Constraint Violating Yak Guru

400 Posts

Posted - 2007-06-22 : 11:12:24
Hi,

I have a .net application and i added a code that encrypts data saved in database. However, there is already data in the fields that was entered before this change.
I know need to check if the values in those fields are encrypted and if not i need to encrypt them.
How can I perform such a check and update the relevant data?
I use TrippleDES in .net to encrypt/decrypt the data.

Thanks

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-06-22 : 11:16:44
i don't think you can.
you should add a bit field IsEncrypted and set all to 0 before adding encryption.
then you know which data was encrypted.

maybe your .net encryption provider has some IsEncrypted function that you can use on existing data?

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page
   

- Advertisement -