Final answer:
The process of adding random characters to a password to generate a different hash is called salting. Salting adds an additional layer of security to password hashing by making it more difficult for attackers to crack passwords.
Step-by-step explanation:
The process of adding random characters at the beginning or end of a password to generate a completely different hash is called salting. Salting is a technique used in password hashing to add an additional layer of security by making it more difficult for attackers to crack passwords using precomputed tables.
When a password is salted, a random value is added to the password before it is hashed. This random value is called the salt. By using a different salt for each user, even if they have the same password, the resulting hash will be different. This makes it much more difficult for attackers to use precomputed tables, known as rainbow tables, to crack passwords.
For example, if the original password is 'password123', and a random salt value of 'xq87t' is added, the salted password might become 'xq87tpassword123'. The salted password is then hashed and stored in the database. When a user enters their password to log in, the same salt is added, the password is hashed, and the resulting hash is compared with the one stored in the database.