Best Way to Generate Random Salt in C#?

喜欢而已 提交于 2019-12-30 02:38:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!