Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6219911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:52:00+00:00 2026-05-24T07:52:00+00:00

So for example I have a simple HTML form: <h3> <a href=#>Login</a> </h3> <div

  • 0

So for example I have a simple HTML form:

      <h3>
            <a href="#">Login</a>
        </h3>
        <div id="tabs-login">
            <form method="get" action="./dev.html">
                <fieldset>
                    <legend>
                        Email:
                    </legend>
                    <input type="text" class="required email" name="login" />
                </fieldset>
                <fieldset>
                    <legend>
                        Password:
                    </legend>
                    <input type="password" class="required" name="pass" />
                </fieldset>
                <input type="submit" value="Submit" />
            </form>
        </div>

And I use jQuery to validte it:

    <script>
      $(document).ready(function() { $("form").validate(); });
    </script>

I want on form submition to take user inputed password value and take SHA256 from it via this jQuery plugin and submit email=user-inputed-value and pass=sha-value. How to access validated values via jQuery and change them and send to original form destination?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T07:52:01+00:00Added an answer on May 24, 2026 at 7:52 am

    First — I want to point out that I don’t think this is a good idea. It’s generally a bad idea to implement password hashing on the client side. Instead, the pass should be sent in plain text (over HTTPS) to the server, where it is then hashed using your preferred algorithm before storage. This has the added benefit of not advertising to potential attackers which hashing method is used, since that code exists only on the server.

    That said: you’re going to want to calculate that SHA value prior to form submit.

    You could bind an event handler to the password field’s blur event to update a hidden field’s value with the new hash. Or you could add the update logic to the validation code.

    Regardless of where the extra code goes, it will be much easier for you to prepare the hash prior to the form submit than it will be to send a second submission chasing after the first.

    E.g.

    <!-- add this to the form -->
    <input type="hidden" name="sha_pass" value="" />
    
    // add this to the document ready handler
    $('[name=pass]').blur(function() {
        $('[name=sha_pass]').val($.sha256($(this).val());
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Take a very simple case as an example, say I have this URL: http://www.example.com/65167.html
I have this simple example I can't seems to get working : MERGE INTO
I have a simple HTML form that uses uses ajax in part of the
I have a simple JSF 2.0 composite component example. <!DOCTYPE html PUBLIC -//W3C//DTD XHTML
I have setup a simple example to show a form inside a jquery UI
I have a simple form, e.g: HTML: Your favorite food? Pizza: <input type=checkbox name=food[]
I'm using this simple modal dialog example here: http://jqueryui.com/demos/dialog/modal-form.html When the page loads, jQuery
I have this example simple code to enable and disable a form according to
For example I have a simple class like public class Person{ public int Age
i have simple regular expression: ^123$ Matches are for example 123 1234 etc. How

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.