问题
Question says it all, what is the best method of generating a random salt (to be used with a hash function) in C#?
回答1:
You should use the RNGCryptoServiceProvider class to generate cryptographically secure random numbers..
回答2:
Enterprise Library should be able to create a random salt for you very effectively. Check it out here.
来源:https://stackoverflow.com/questions/6415724/best-way-to-generate-random-salt-in-c