I learned that I need to use salt so that same passwords won't show in database.
But where to get the salt? I cannot use one for all as it wouldn't help anything. I can generate a random one, but then the hash would be different every time and nobody would log back in.
So I found suggestion to use cryptographically safe RNG and store the salt with user.
But I would have to make the table larger for that. Can't I use the same hashing function to hash the username and use that as the salt for password? It should be cryptographically safe since I use cryptographically safe hashing function for hashing passwords right?