School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,338 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,700 people online right now. Registration is fast and FREE... Join Now!




how to manage password in MSSQL server

 

how to manage password in MSSQL server, i want to know the technique used to manage password in MSSQL

lawale4me

19 Mar, 2009 - 01:57 AM
Post #1

New D.I.C Head
*

Joined: 19 Mar, 2009
Posts: 1

i want to know the technique used to manage password in MSSQL .

i mean if i want the value stored in the database not be in varchar or char data type....i wnat it to be in a form that its not readable how do i declare it
thanks
Laa

User is offlineProfile CardPM
+Quote Post


JackOfAllTrades

RE: How To Manage Password In MSSQL Server

19 Mar, 2009 - 03:53 AM
Post #2

I exist to Google your problems.
Group Icon

Joined: 23 Aug, 2008
Posts: 4,945



Thanked: 423 times
Dream Kudos: 50
Expert In: Being annoyed with lazy people.

My Contributions
You should never store a password in clear text. What you should do is create a hash of it with SHA and save the string that results from the hash. When you want to compare to the user input, hash the user input the same way then compare against the previously hashed value in the database.
User is offlineProfile CardPM
+Quote Post

kzimmerm

RE: How To Manage Password In MSSQL Server

20 Mar, 2009 - 07:25 AM
Post #3

D.I.C Head
**

Joined: 8 Feb, 2009
Posts: 67



Thanked: 3 times
My Contributions
I agree here. I just finished an application where I save the password as a binary which is the result of MD5 hash. This is real simple to accomplish in .NET. MD5 is a 1 way encryption, which, for passwords it isn't important to decrypt it. You simply match the MD5 hash to what is stored.

Good luck.

Kurt


User is offlineProfile CardPM
+Quote Post

almogaver

RE: How To Manage Password In MSSQL Server

21 Mar, 2009 - 03:05 PM
Post #4

New D.I.C Head
*

Joined: 20 Mar, 2009
Posts: 10


My Contributions
Hi,

If you have only one database username, then I agree with the preceding answers.
Otherwise is better to delegate user access control to SQL Server (use Windows integrated security, SQL Server security or mixed mode, your choice!). This avoids the need to store username and passwords (or digests).


Best regards

This post has been edited by almogaver: 21 Mar, 2009 - 03:07 PM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 05:17PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month