You also do not need to hash. If the user wants to reset their password through a question / answer, he must send an email with a link for this. If the attacker managed to get answers to questions / answers, they still will not help them if they no longer have access to the user's email, which means that all bets are largely disabled. You could haveh the answers if you want, and they will be stored in the same way as passwords, since they will end in the same format.
One question, however, are users asking their own question or choosing from a list? If from the list, why not just use the identifier for which the question was used, and have potential questions either in another table or hardcoded in the script?
Phoenix
source share