I was given a JSP page where anyone can just view the page source and find the Username and password. My task is to make it somewhat secure. After some reading, I figured I would want to implement an SHA-256 encryption system, but I am not too sure how to do this.
How should I store the hashed passwords? I have barely any experience with JSP / security, so I don't fully understand the steps. After a user enters his password, and it gets encrypted with SHA 256, does this string get compared to a string in a text file? What's the best way for this?
What is the difference between having the entire procedure done in one JSP file versus multiple. I notice how sometimes the login and encryption occurs in the same file while other times, the form uses other JSP files.