A Salt is a pseudo-random string used when encrypting or hashing a string (like a password). Salts are used to improve protection against some kinds of attack, like dictionary-based attacks. Different algorithms use salts in different ways, but if you just want to use a salt for password safety, you can rely on the password_hash() function (see the previous question). In fact, this function automatically adds a pseudo-random salt to the hash for you.