Mask Password

  • I am attempting to create a backend database that is to accessed by a front end web site. I have created a single table in my sql db 'dbo.Users'. One of the fields contains the users password. Currently it is stored in plain text. In access I know how to mask this but how is it achieved in SQL?

    Many Thanks,

    Phil.

    -------------------------------------------------------------------------------------
    A neutron walks into a bar. "I'd like a beer" he says. The bartender promptly serves up a beer. "How much will that be?" asks the neutron. "For you?" replies the bartender, "no charge."

    Two hydrogen atoms walk into a bar. One says, 'I think I've lost an electron.' The other says 'Are you sure?' The first says, 'Yes, I'm positive... '

    Tommy Cooper

  • Check out Encryption:Columns in SQL Server BOL

    DAB

  • Thanks I will have a read.

    Phil

    -------------------------------------------------------------------------------------
    A neutron walks into a bar. "I'd like a beer" he says. The bartender promptly serves up a beer. "How much will that be?" asks the neutron. "For you?" replies the bartender, "no charge."

    Two hydrogen atoms walk into a bar. One says, 'I think I've lost an electron.' The other says 'Are you sure?' The first says, 'Yes, I'm positive... '

    Tommy Cooper

  • Back again. I am running SQL 2005 on a XP Pro machine. Here is what I did:

    create master key encryption by password = 'Pufd&s@))%';

    create certificate cert_sk_admin with subject = 'Certificate for accessing symmetric keys - for use by admin';

    create certificate cert_sk_charles with subject = 'Certificate for accessing symmetric keys - for use by Charles';

    create symmetric key sk_users with algorithm = aes_192 encryption by certificate cert_sk_admin;

    The above command generates an error:

    Msg 15314, Level 16, State 1, Line 1

    Either no algorithm has been specified or the bitlength and the algorithm specified for the key are not available in this installation of Windows.

    Any Ideas?

    Thanks,

    Phil.

    -------------------------------------------------------------------------------------
    A neutron walks into a bar. "I'd like a beer" he says. The bartender promptly serves up a beer. "How much will that be?" asks the neutron. "For you?" replies the bartender, "no charge."

    Two hydrogen atoms walk into a bar. One says, 'I think I've lost an electron.' The other says 'Are you sure?' The first says, 'Yes, I'm positive... '

    Tommy Cooper

  • I don't believe that AES is available in XP.

    No one is likely to crack them. I'd use one of the shorter and quicker algorithms like RSA for the asymmetric key.

  • Thanks Steve, I will have a read up on asymmetric keys.

    Phil

    -------------------------------------------------------------------------------------
    A neutron walks into a bar. "I'd like a beer" he says. The bartender promptly serves up a beer. "How much will that be?" asks the neutron. "For you?" replies the bartender, "no charge."

    Two hydrogen atoms walk into a bar. One says, 'I think I've lost an electron.' The other says 'Are you sure?' The first says, 'Yes, I'm positive... '

    Tommy Cooper

Viewing 6 posts - 1 through 5 (of 5 total)

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