Poll: Where do you hash passwords?

There’s no client-side crypto formatters at the moment. I did submit a FR a LONG time ago:

It is easy, though, to use a javascript function on submit (I use the crypto-js library - you need to include it on the page). I prefer not to use a formatter as I want the function to not only create the hash but also clear the plain-text version.

function pwhashsend() {
    var cp = document.getElementById('plain_pw'); // plain password input
    var np = document.getElementById('enc_pw'); // hidden password input (encrypted) to be used
    var p = cp.value;
    var hp = CryptoJS.SHA512(p);
    hp.toString(CryptoJS.enc.Hex);
    cp.value = '';
    np.value = hp;
    return true;
}

on the form element use

onsubmit ="return pwhashsend()"
1 Like