Using GetHashCode to "Protect" User Passwords

The company I work for took on a contract to support a large order processing system. As part of the initial system audit, I noticed that the passwords stored in the database are actually a password hash.

Essentially:

string pwd = "some pasword";
string securePwd = pwd.GetHashCode();

My question is: is it safe or not?

I don’t like it, but I don’t know how GetHashCode works. I would rather use something like an MD5 hash, but if I spend my time, I will not worry.

+3
source share
6 answers

GetHashCode 32- -. , - , , .

SHA256 , .

-. "" , . - bcrypt, scrypt, PBKDF2, .

+4

, SHA256Managed.

Jeff Attwood :

-

,

+5

BCrypt. , GetHashCode .

+2

GetHashCode , - . , . .NET, , , .

MD5 . - Security.Cryptography.

+1

, GetHashCode , . , .

, , ​​ bcrypt, , , Stanford. . , , .

+1

Source: https://habr.com/ru/post/1704194/


All Articles