Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6171007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:08:18+00:00 2026-05-23T23:08:18+00:00

A string salt = Crypto.GenerateSalt(); string saltAndPwd = String.Concat(originalPassword, salt); string hashedPwd = Crypto.HashPassword(saltAndPwd);

  • 0

A

string salt = Crypto.GenerateSalt();
string saltAndPwd = String.Concat(originalPassword, salt);
string hashedPwd = Crypto.HashPassword(saltAndPwd);

B

string hashedPwd = Crypto.HashPassword(originalPassword);

May i know Method A and Method B, which is more secure ? or which is the correct approach ? with reflector, i found this is the hash password method in the core :

public static string HashPassword(string password)
{
if (password == null)
{
    throw new ArgumentNullException("password");
    }
    return HashWithSalt(password, GenerateSaltInternal(0x10));
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T23:08:18+00:00Added an answer on May 23, 2026 at 11:08 pm

    As the main purpose of using a salt is to defeat rainbow tables, adding additional salt to what HashPassword already does doesn’t seem like it will gain you much benefit, and only incur additional overhead (as you have to store the salt you generate yourself. HashPassword builds it into the returned value). For reference, this is what HashPassword does:

    The password hash is generated with the RFC 2898 algorithm using a 128-bit salt, a 256-bit subkey, and 1000 iterations. The format of the generated hash bytestream is {0x00, salt, subkey}, which is base-64 encoded before it is returned.

    So, in short, what’s in the framework already is good enough for any reasonable definition of good enough.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

how can i know value of string which is used as salt for joomla
I have two quick questions about Ruby's String#crypt(salt) method: In the documentation it says
Which hash algorithm does Ruby's String.crypt method use? When used in conjunction with a
I am generating salt and hash values from my passwords by using, string salt
Here is an algorithm in Java: public String getHash(String password, String salt) throws Exception
I'm using C# and BCrypt.Net to hash my passwords. For example: string salt =
At the moment I do this: public static class Crypto { public static string
String s = ; for(i=0;i<....){ s = some Assignment; } or for(i=0;i<..){ String s
string percentage = e.Row.Cells[7].Text; I am trying to do some dynamic stuff with my
string [] files = new string[2]; files[0] = ThinkFarAhead.Example.Settings.Configuration_Local.xml; files[1] = ThinkFarAhead.Example.Settings.Configuration_Global.xml; //Resharper complains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.