Privacy/Features/DOMCryptAPI/UseCases: Difference between revisions

 
Line 40: Line 40:
SHA 256 hashes are handy for storing passwords and generating checksums (among other uses)
SHA 256 hashes are handy for storing passwords and generating checksums (among other uses)


Example code uses the hashing API: '''window.crypto.hash.*'''
Example code uses the hashing API, using the constructor '''window.crypto.hash'''
 
[Constructor(in DOMString algorithm)]
08.interface CryptoHash {
09.void append(in ArrayBuffer data);
10.ArrayBuffer finish();
11.};


<pre class="brush:js;toolbar:false;">
<pre class="brush:js;toolbar:false;">
564

edits