Create hash function to generate a secret key based on the stored salt and an input password.