Given a form in HTML5
<form action="/login/password" method="post">
<section>
<label for="username">Username</label>
<input id="username" name="username" type="text" autocomplete="username" required autofocus>
</section>
<section>
<label for="password">Password</label>
<input id="password" name="password" type="password" autocomplete="password" required>
</section>
<button type="submit">Sign in</button>
</form>
When clicking the submit button, how can the password
field be transformed. For example, rather than send the password
field as is, submit hash(password)
instead (where hash()
function is given)