how to DO Data Encryption and Decryption in SQL Server ?

  • for example iam having a table TBLLOGINTABLE in this table i wan to encrypt datas of a column

    password while inserting the password

    CREATE TABLE [dbo].[TBLLOGINTABLE](

    [LOGINID] INT IDENTITY(1,1) constraint pk_TBLLOGINTABLE_SRCTID primary key,

    [USERNAME] [varchar](200) NULL,

    [PASSWORD] [varchar](200) NULL

    )

    i just followed this link

    http://msdn.microsoft.com/en-us/library/ms179331(v=sql.100).aspx

    http://www.c-sharpcorner.com/UploadFile/chinnasrihari/data-encryption-and-decryption-in-sql-server-2008/

    but didnt find the solution properly how to make that easly

  • Ok, first thing...

    Passwords should never be stored using reversible encryption. They should be stored using a salted cryptographic hash. In SQL, the hash function is HASH_BYTES. You may need to do some reading first on what's meant by a salted hash.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • can u plz give one simple example for that

  • There are simple examples in Books Online.

    Seriously though, for the security of your data, please spend some time reading up on hashes, salted hashes and how to properly secure passwords.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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