Password Field

  • 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

    In Theory, theory and practice are the same...In practice, they are not.
  • see http://qa.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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thank you very much Lowell!

    It works fine!

    In Theory, theory and practice are the same...In practice, they are not.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply