title: Code hash function over data in form - already have function but don't know where to call
body: <p>I have form in my html page</p>
  
  <pre><code>&lt;form id="login_form" method="POST" action="index.php"&gt;
      &lt;table&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;label style="color:#47A3FF;" for="name" title="User name"&gt;
                  Username&lt;/label&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input style="color:#47A3FF;" dojoType="dijit.form.TextBox"
                  type="text" name="username"&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;label style="color:#47A3FF;" for="loc"&gt;Password: &lt;/label&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input style="color:#47A3FF;" dojoType="dijit.form.TextBox"
                  type="password" name="password"&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td colspan="2" align="center"&gt;
                  &lt;button dojoType="dijit.form.Button"  class="soria" style="border: 1px solid black; float:right;"
                  type="submit"&gt;Login&lt;/button&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Do I need to use SHA256 when I send username and password over network ? How to use SHA256 over those data ( I have function sha256_hash which use string and return hashed value, but I don't know where to call that function ) ?</p>