Modified to use secret_key as salt