In C# how we can use SHA1 automatically?
Is SHA1 better than MD5?(We use hashing for user name and password and need speed for authentication)
In C# how we can use SHA1 automatically? Is SHA1 better than MD5?(We use
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Not sure what you mean by automatically, but you should really use
SHA256and higher. Also always use a Salt (code) with your hashes. A side note, after time has passed, using hardened hashes is far better than using a plain speed-based hashing function. I.e.: hashing over a few hundred iterations, or using already proven hashing functions such asbcrypt(which is mentioned below I believe). A code sample for using a SHA256 hash function in .NET is as follows:Will do the trick for you using SHA256 and is found at MSDN.
Sidenote on the “cracking” of SHA1: Putting the cracking of SHA-1 in perspective