Quantcast
Channel: How to salt and hash a password value using c#? - Stack Overflow
Viewing all articles
Browse latest Browse all 7

Answer by µBio for How to salt and hash a password value using c#?

$
0
0

Like the others have said, there are many options.

Here is some sample code (using MD5 instead of SHA) from Microsoft that might help get you get started

   using System;   using System.Security.Cryptography;   using System.Text;   string sSourceData;   byte[] tmpSource;   byte[] tmpHash;   sSourceData = "MySourceData";   //Create a byte array from source data.   tmpSource = ASCIIEncoding.ASCII.GetBytes(sSourceData);   //Compute hash based on source data.   tmpHash = new MD5CryptoServiceProvider().ComputeHash(tmpSource);

Viewing all articles
Browse latest Browse all 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>