July 15, 2011 at 3:57 am
Hi,
Help me ,
How to encryt two column in a table
table name: account
Fields (ssn int, b_date datetime)
Is it possible to encrypt int,datetime coumln...
Thanks
July 15, 2011 at 4:15 am
using cell encryption it is possible, there are schema changes to the columns to enable this. The data must be encrypted\decrypted as it is written\read from the table.
This link provides further details
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
July 15, 2011 at 4:50 am
Could you give any example for encrypt & decrypt two column in a table ( ssn int, b_date datetime)
i'm going to implement in production server..
Thanks
July 15, 2011 at 5:44 am
you have a pretty wide array of encryption choices, but as Perry Whittle mentioned, they require a schema change...you'll need to change a varchar column to varbinary, for example using the encryption below.
here's a basic example; it should be obvious that you can encrypt each column you want to protect individually from there:
--http://www.databasejournal.com/features/mssql/article.php/3714031/SQL-Server-2005-Encryption-types.htm
-- EncryptByPassPhrase(@password,@DataToEncrypt )
select EncryptedData = EncryptByPassPhrase('NotMyRealPhraseKey', '123456789' )
-- DecryptByPassPhrase(@password,@DataToDecrypt )
declare @val varbinary(max)
SET @val = 0x01000000DCE1DCC7E4F8710C513B48D4639F089F5035AB5DEEDCD10DCEF00F929A3F678D
select convert(varchar(100),DecryptByPassPhrase('NotMyRealPhraseKey',@val))
Lowell
July 15, 2011 at 5:53 am
solomon.jernas (7/15/2011)
Could you give any example for encrypt & decrypt two column in a table ( ssn int, b_date datetime)
I did in the link above 😉
It's a case of RTFM
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
July 15, 2011 at 9:05 am
solomon.jernas (7/15/2011)
Could you give any example for encrypt & decrypt two column in a table ( ssn int, b_date datetime)i'm going to implement in production server..
Thanks
I hope you do thorough testing first.
We use xpcrypt
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply