I am working on a login system where you hash the password on the client side, before sending it to the server. I have got as far as grabbing the password and hashing it, and now I just need to insert it into the database and/or compare for a login.
    <form action="javascript:;" onsubmit="return changeFormLogin()">
        <p>Email</p>
        <input id="username" type="email" name="username" placeholder="Enter Email" required>
        <p>Password</p>
        <input id="getPass" type="password" name="password" placeholder="••••••" required>
        <input type="submit" name="login" value="Sign In">
        <p id="demo"></p>
    </form>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/js-sha256/0.9.0/sha256.min.js" ></script>
    <script>
        function changeFormLogin() {
            var pass = document.getElementById('getPass').value;
            var username  = document.getElementById('username').value;
            var getSalt = 123566;
            var hashpass = sha256(pass+pass);
            console.log(hashpass);
            var tmp = validateLogin(hashpass);
            if(tmp ==1){                        
                //Welcome the user back, and load new form
            }
            else{
                //Tell them to try again, notify them.
            }
            document.getElementById("demo").innerHTML = hashpass; //Used for testing
            return true;
        }
 
     
     
     
    