Best/Easiest Way to save username and password data into a DB

Pho3nix

The Legend
Joined
Jul 31, 2009
Messages
30,589
Hi,

As title states, looking for a easy but efficient way to make this work. Thoughts?
C# API for the moment that I'll be building on top of :)
 

Messugga

Honorary Master
Joined
Sep 4, 2007
Messages
12,746
That depends. What database? In what way do you want to store the password? Plain text? Encrypted? Hash?
Best and easiest are often mutually exclusive. In my personal opinion, when it comes to security, best should have a significantly heavier weight than easiest.
 

rrh

Expert Member
Joined
Nov 29, 2005
Messages
4,031
Store the username and a [possibly encrypted] salted hash of the password. .NET has a stack of applicable classes.
 

Pho3nix

The Legend
Joined
Jul 31, 2009
Messages
30,589
That depends. What database? In what way do you want to store the password? Plain text? Encrypted? Hash?
Best and easiest are often mutually exclusive. In my personal opinion, when it comes to security, best should have a significantly heavier weight than easiest.
Should be SQL if I still have credits on Azure, else AWS
Store the username and a [possibly encrypted] salted hash of the password. .NET has a stack of applicable classes.
Saw a few here and there. Figured I'd ask if anyone has used anything they like for actual reasons though.
 

freddster

Expert Member
Joined
Dec 13, 2013
Messages
2,470
Why don't you use the DB login and password? Then its the DBMS's problem.
 

skimread

Honorary Master
Joined
Oct 18, 2010
Messages
12,419
If you use C# don't reinvent the wheel, use Identity Framework
 

zippy

Honorary Master
Joined
May 31, 2005
Messages
10,321
The "best" is dont save password in a db or anywhere, even if its "encrypted"

You can set up os authentication. There are many better secure alternatives.
 

AfricanTech

Honorary Master
Joined
Mar 19, 2010
Messages
40,369
The "best" is dont save password in a db or anywhere, even if its "encrypted"

You can set up os authentication. There are many better secure alternatives.

Any decent corporate will insist on this
 
Top