Updated the Overview.html
authorDavid Dahl <ddahl@mozilla.com>
Fri, 25 Jan 2013 10:32:29 -0600
changeset 3 be02e044185a
parent 2 b63f163cc987
child 4 27bcbfdc4adf
Updated the Overview.html
Overview.html
--- a/Overview.html	Fri Jan 25 10:31:14 2013 -0600
+++ b/Overview.html	Fri Jan 25 10:32:29 2013 -0600
@@ -130,7 +130,7 @@
       <p>The Privacy considerations of [[!WEBCRYPTO]] apply to this specification.</p>
       <section>
           <p>
-            TBD
+            TODO
           </p>
       </section>
     </section>
@@ -228,7 +228,7 @@
           <dt>[TreatNonCallableAsNull] attribute Function? onVerifyError</dt>
           <dd>onVerifyError event handler</dd>
 
-          <dt>void hash(in DOMString aData)</dt>
+          <dt>void hash(in DOMString aJWAlgID, in DOMString aData)</dt>
           <dd>Create a cryptographic hash</dd>
           <dt>[TreatNonCallableAsNull] attribute Function? onHashComplete</dt>
           <dd>onHashComplete event handler</dd>
@@ -358,7 +358,23 @@
 };
 
 cryptoAPI.verify(RECEIVED_JWS, SIGNER_JWK);        
-</pre>        
+</pre>
+
+<h3>Hash creation</h3>
+<pre class="example sh_html sh_sourceCode">
+var stringToHash = "Please hash me";
+
+cryptoAPI.onHashComplete = function (aHashString) {
+  // save this hash, compare to another, etc
+};
+
+cryptoAPI.onHashError = function (aError) {
+  // console.log(aError), etc.
+};
+
+cryptoAPI.hash("SHA512", stringToHash);
+</pre>
+        
       </section> 
     </section>
     <!--