Salting adds random data to passwords before hashing.
Salting involves appending a unique random string to each password before hashing it. This ensures that even identical passwords result in different hashes, defeating pre-computed rainbow tables. In Java, use BCrypt's gensalt() method to generate a secure salt.