--- a/highlevel-api-source.html Fri Jan 25 10:22:21 2013 -0600
+++ b/highlevel-api-source.html Fri Jan 25 10:31:14 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>
<!--