C# hash password create salt question

Posted by 5YrsLaterDBA on Stack Overflow See other posts from Stack Overflow or by 5YrsLaterDBA
Published on 2010-06-11T19:02:11Z Indexed on 2010/06/11 19:42 UTC
Read the original article Hit count: 218

Filed under:
|
|

If I create salt by using something like this:

public class User
    {
        private const int Hash_Salt_Length = 8;
        private byte[] saltBytes = new byte[Hash_Salt_Length];


        public User()
        {
            RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
            rng.GetNonZeroBytes(saltBytes);     
        }
        ....

}

The saltBytes bytes array will be different for each session (restart the application). How can I check password to allow user login our application?

© Stack Overflow or respective owner

Related posts about c#

Related posts about security