September 12, 2005 at 6:19 am
Hi all,
Is it a way to define an encrypted field for a table design?
I have a table defined like this:
ID int,
Operator nvarchar(10),
Password nvarchar(10),
AR bigint
From an application I send Operator, Password and AR (AccessRights) through
OLE-DB to SQL-Server. I want the value of Password to be SQL Server encrypted.
Sorin
September 12, 2005 at 1:38 pm
see http://www.sqlservercentral.com/scripts/contributions/610.asp for the stored procs:
create table ExampleTbl(Operator int , Password varchar(40) , AR varchar(40) )
insert into ExampleTbl(operator,password,ar) values (1,dbo.RC4('realpass','seedstring'),'x')
select Operator,dbo.RC4(password,'seedstring'),ar from ExampleTbl where Operator=1
select Operator,dbo.RC4(password,'wrongstring'),ar from ExampleTbl where Operator=1
results:
Operator | Password | AR |
1 | realpass | x |
1 | MŽŠ‚Ä|k | x |
Lowell
September 13, 2005 at 1:54 am
Thank you very much Lowell!
It works fine!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply