Which is the Preferred Method of Storing Passwords In Database

0 votes
Oct 11, 2019 in Database by Daric
• 500 points
1,079 views

1 answer to this question.

0 votes

Generally, we can use the sha hash of the username, a guide in the web config, and the password, stored as a varchar(40). If they want to brute force/dictionary they'll need to hack the webserver for the guide as well. The username breaks creating a rainbow table across the whole database if they do find the password. If a user wants to change their username, I just reset the password at the same time.

System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(
    username.ToLower().Trim(),
    ConfigurationManager.AppSettings("salt"),
    password
);
answered Oct 11, 2019 by Omaiz
• 560 points

Related Questions In Database

0 votes
0 answers

What is the advantage of using "Set NOCOUNT ON" in stored procedure's which are used in ssis packages?

While studying SQL Server's performance tuning concepts, ...READ MORE

Aug 28, 2022 in Database by Kithuzzz
• 38,000 points
533 views
0 votes
1 answer

Which operator is used in the query for pattern matching?

LIKE operator is used for pattern matching, ...READ MORE

answered Oct 15, 2018 in Database by DataKing99
• 8,250 points
23,781 views
0 votes
1 answer

What is a Join in terms of database?

JOINS are used to combine rows from ...READ MORE

answered Nov 13, 2018 in Database by DataKing99
• 8,250 points
1,032 views
0 votes
1 answer

What are the different types of keys used in the database?

There are mainly 5 types of Keys, ...READ MORE

answered Nov 19, 2018 in Database by Sahiti
• 6,370 points
5,925 views
0 votes
1 answer

What is the syntax of USE statement in MySQL?

The USE statement is used to mention ...READ MORE

answered Nov 27, 2018 in Database by Sahiti
• 6,370 points
772 views
0 votes
1 answer

what is the syntax of OR statement in MySQL?

The OR operator displays those records which ...READ MORE

answered Dec 1, 2018 in Database by Sahiti
• 6,370 points
678 views
0 votes
1 answer

What is the definition of cardinality in SQL?

Cardinality is defined as the "number of ...READ MORE

answered Feb 15, 2022 in Database by Neha
• 9,020 points
1,855 views
0 votes
0 answers

What is the definition of cardinality in SQL?

My book definition of Database Systems does ...READ MORE

Feb 18, 2022 in Database by Neha
• 9,020 points
783 views
0 votes
2 answers

How to select the nth row in a SQL database table?

SELECT * FROM ( SELECT ID, NAME, ROW_NUMBER() ...READ MORE

answered Apr 23, 2020 in Database by anand
• 140 points
26,261 views
0 votes
1 answer

Which is better database vs. flat files?

Difference between database and flat files are ...READ MORE

answered Oct 11, 2019 in Database by Omaiz
• 560 points
12,803 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP