You make salt right. It just has to be random. There are many different methods for randomly generating this. Some people use it in addition to dates, etc. In addition, longer salts are not very important, as they will be cut off in any case. It requires a certain length, at least in terms of crypt (). Therefore, if a little extra supplement makes you feel better, go for it.
Suppose you store salt in a database. At first it was difficult for me to understand this. The whole point of salt is only to take longer to rainbow pin passwords with a huge list of possible passwords. In addition, the fix also helps with two or more passwords that are the same, which should happen. If so, the hashes will still be different due to random salts.
As for crypt (), keep testing it until it looks and is the same length as the PHP-DOC for PHP, but yes, it looks right.
source share