locked
Encript password in sql server RRS feed

  • Question

  • Dear Sir,

                    I  am creating a window based application using vb.net and sql server.

                    I create a login table in database(sql) column name is user id and password.

                    but how can i encript on this login table column name password ?Please guide me


    Bhagabat Dayal Dash Software Developer Qlogix Solutions(India)
    Friday, January 20, 2012 8:12 AM

Answers

  • Hi, You can use encryption in SQL Server 2008.

     

    http://msdn.microsoft.com/en-us/library/cc278098%28v=sql.100%29.aspx

     

    I hope this is helpful.

     

    Elmozamil Elamir

    MyBlog


    Please Mark it as Answered if it answered your question
    OR mark it as Helpful if it help you to solve your problem
    Elmozamil Elamir Hamid
    http://elmozamil.blogspot.com
    • Marked as answer by Stephanie Lv Monday, January 30, 2012 7:32 AM
    Friday, January 20, 2012 10:35 AM
  • One question is:  Do you want to be able to decrypt it?  If not, a hash of the password is much safer to save.  Then no one (not even you) can decrypt the password.

    In your .NET code you could pass the hash, not the actual password, into your table.  Then compare hashes to make sure that the right password was entered. 

    If you do it using SQL Server functions see HASHBYTES: http://msdn.microsoft.com/en-us/library/ms174415.aspx

    RLF

    • Marked as answer by Stephanie Lv Monday, January 30, 2012 7:32 AM
    Friday, January 20, 2012 5:47 PM

All replies

  • Please find some help here. you can use md5 or sha1 encryption.

    http://social.msdn.microsoft.com/Forums/eu/Vsexpressvb/thread/ede9585a-f19d-43b2-b915-5fd0cd59236f

     

     


    http://joeydj.com/blogs
    Friday, January 20, 2012 8:57 AM
  • Hi, You can use encryption in SQL Server 2008.

     

    http://msdn.microsoft.com/en-us/library/cc278098%28v=sql.100%29.aspx

     

    I hope this is helpful.

     

    Elmozamil Elamir

    MyBlog


    Please Mark it as Answered if it answered your question
    OR mark it as Helpful if it help you to solve your problem
    Elmozamil Elamir Hamid
    http://elmozamil.blogspot.com
    • Marked as answer by Stephanie Lv Monday, January 30, 2012 7:32 AM
    Friday, January 20, 2012 10:35 AM
  • One question is:  Do you want to be able to decrypt it?  If not, a hash of the password is much safer to save.  Then no one (not even you) can decrypt the password.

    In your .NET code you could pass the hash, not the actual password, into your table.  Then compare hashes to make sure that the right password was entered. 

    If you do it using SQL Server functions see HASHBYTES: http://msdn.microsoft.com/en-us/library/ms174415.aspx

    RLF

    • Marked as answer by Stephanie Lv Monday, January 30, 2012 7:32 AM
    Friday, January 20, 2012 5:47 PM
  • hi check this link, http://social.msdn.microsoft.com/Forums/en/sqlgetstarted/thread/a7b0c555-0f6b-43d4-bf8f-f67061d05b12

    this will help you a lot

    Monday, January 23, 2012 11:21 AM