Bug 26895 convert to use of BufferSource typedef from WebIDL instead of (ArrayBuffer or ArrayBufferView)
authorMark Watson <watsonm@netflix.com>
Mon, 27 Oct 2014 14:45:16 -0700
changeset 265 7dd14c51e4b7
parent 264 4c8aa1eee8c8
child 266 f4f845756989
Bug 26895 convert to use of BufferSource typedef from WebIDL instead of (ArrayBuffer or ArrayBufferView)
spec/Overview-WebCryptoAPI.xml
spec/Overview.html
--- a/spec/Overview-WebCryptoAPI.xml	Wed Oct 22 15:50:08 2014 -0700
+++ b/spec/Overview-WebCryptoAPI.xml	Mon Oct 27 14:45:16 2014 -0700
@@ -670,6 +670,9 @@
           are defined by the HTML specification [<a href="#HTML">HTML</a>].
         </p>
         <p>
+          The term <dfn id="BufferSource">BufferSource</dfn> is defined in [<cite><a href="#WebIDL">WEBIDL</a></cite>].
+        </p>
+        <p>
           An <dfn id="dfn-octet-string">octet string</dfn> is an ordered sequence of zero or more
           integers, each in the range 0 to 255 inclusive.
         </p>
@@ -795,8 +798,8 @@
           </li>
         </ol>
         <p>
-          When this specification says to <dfn id="concept-clone-CryptoOperationData">clone the
-          data</dfn> of a <a href="#dfn-CryptoOperationData">CryptoOperationData</a> object
+          When this specification says to <dfn id="concept-clone-BufferSource">clone the
+          data</dfn> of a <a href="http://heycam.github.io/webidl/#common-BufferSource">BufferSource</a> object
           <var>data</var>, the user agent must run the following steps:
         </p>
         <dl class="switch">
@@ -1224,25 +1227,23 @@
         <x:codeblock language="idl">
 typedef DOMString <a href="#dfn-KeyFormat"><code>KeyFormat</code></a>;
 
-typedef (ArrayBuffer or ArrayBufferView) CryptoOperationData;
-
 [Exposed=(Window,Worker)]
 interface <dfn id="dfn-SubtleCrypto">SubtleCrypto</dfn> {
   Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-encrypt">encrypt</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
                        <a href="#dfn-CryptoKey">CryptoKey</a> key,
-                       CryptoOperationData data);
+                       BufferSource data);
   Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-decrypt">decrypt</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
                        <a href="#dfn-CryptoKey">CryptoKey</a> key,
-                       CryptoOperationData data);
+                       BufferSource data);
   Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-sign">sign</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
                     <a href="#dfn-CryptoKey">CryptoKey</a> key,
-                    CryptoOperationData data);
+                    BufferSource data);
   Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-verify">verify</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
                       <a href="#dfn-CryptoKey">CryptoKey</a> key,
-                      CryptoOperationData signature,
-                      CryptoOperationData data);
+                      BufferSource signature,
+                      BufferSource data);
   Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-digest">digest</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
-                      CryptoOperationData data);
+                      BufferSource data);
 
   Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-generateKey">generateKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
                           boolean extractable,
@@ -1258,7 +1259,7 @@
   
   <span class="comment">// TBD: <a href="https://www.w3.org/2012/webcrypto/track/issues/35">ISSUE-35</a></span>
   Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-importKey">importKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
-                         (CryptoOperationData or JsonWebKey) keyData,
+                         (BufferSource or JsonWebKey) keyData,
                          <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
                          boolean extractable,
                          sequence&lt;<a href="#dfn-KeyUsage">KeyUsage</a>&gt; keyUsages );
@@ -1269,7 +1270,7 @@
                        <a href="#dfn-CryptoKey">CryptoKey</a> wrappingKey,
                        <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> wrapAlgorithm);
   Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-unwrapKey">unwrapKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
-                         CryptoOperationData wrappedKey,
+                         BufferSource wrappedKey,
                          <a href="#dfn-CryptoKey">CryptoKey</a> unwrappingKey,
                          <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> unwrapAlgorithm,
                          <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> unwrappedKeyAlgorithm,
@@ -1368,7 +1369,7 @@
               </li>
               <li>
                 <p>
-                  Let <var>data</var> be the result of <a href="#concept-clone-CryptoOperationData">
+                  Let <var>data</var> be the result of <a href="#concept-clone-BufferSource">
                   cloning the data</a> of the <code>data</code> parameter passed to the
                   <a href="#dfn-SubtleCrypto-method-encrypt">encrypt</a> method.
                 </p>
@@ -1459,7 +1460,7 @@
               </li>
               <li>
                 <p>
-                  Let <var>data</var> be the result of <a href="#concept-clone-CryptoOperationData">
+                  Let <var>data</var> be the result of <a href="#concept-clone-BufferSource">
                   cloning the data</a> of the <code>data</code> parameter passed to the
                   <a href="#dfn-SubtleCrypto-method-decrypt">decrypt</a> method.
                 </p>
@@ -1551,7 +1552,7 @@
               </li>
               <li>
                 <p>
-                  Let <var>data</var> be the result of <a href="#concept-clone-CryptoOperationData">
+                  Let <var>data</var> be the result of <a href="#concept-clone-BufferSource">
                   cloning the data</a> of the <code>data</code> parameter passed to the
                   <a href="#dfn-SubtleCrypto-method-sign">sign</a> method.
                 </p>
@@ -1641,7 +1642,7 @@
               </li>
               <li>
                 <p>
-                  Let <var>signature</var> be the result of <a href="#concept-clone-CryptoOperationData">
+                  Let <var>signature</var> be the result of <a href="#concept-clone-BufferSource">
                   cloning the data</a> of the <code>signature</code> parameter passed to the
                   <a href="#dfn-SubtleCrypto-method-verify">verify</a> method.
                 </p>
@@ -1662,7 +1663,7 @@
               </li>
               <li>
                 <p>
-                  Let <var>data</var> be the result of <a href="#concept-clone-CryptoOperationData">
+                  Let <var>data</var> be the result of <a href="#concept-clone-BufferSource">
                   cloning the data</a> of the <code>data</code> parameter passed to the
                   <a href="#dfn-SubtleCrypto-method-verify">verify</a> method.
                 </p>
@@ -1738,7 +1739,7 @@
               </li>
               <li>
                 <p>
-                  Let <var>data</var> be the result of <a href="#concept-clone-CryptoOperationData">
+                  Let <var>data</var> be the result of <a href="#concept-clone-BufferSource">
                   cloning the data</a> of the <code>data</code> parameter passed to the
                   <a href="#dfn-SubtleCrypto-method-digest">digest</a> method.
                 </p>
@@ -2178,7 +2179,7 @@
                       <li>
                         <p>
                           Let <var>keyData</var> be the result of
-                          <a href="#concept-clone-CryptoOperationData">cloning the data</a> of the
+                          <a href="#concept-clone-BufferSource">cloning the data</a> of the
                           <code>keyData</code> parameter passed to the
                           <a href="#dfn-SubtleCrypto-method-importKey">importKey</a> method.
                         </p>
@@ -2582,7 +2583,7 @@
               <li>
                 <p>
                   Let <var>wrappedKey</var> be the result of
-                  <a href="#concept-clone-CryptoOperationData">cloning the data</a> of the
+                  <a href="#concept-clone-BufferSource">cloning the data</a> of the
                   <code>data</code> parameter passed to the
                   <a href="#dfn-SubtleCrypto-method-unwrapKey">unwrapKey</a> method.
                 </p>
@@ -3171,13 +3172,13 @@
                             <dl class="switch">
                               <dt>
                                 If <var>member</var> is of the type
-                                <a href="#dfn-CryptoOperationData">CryptoOperationData</a> and is
+                                <a href="http://heycam.github.io/webidl/#common-BufferSource">BufferSource</a> and is
                                 present:
                               </dt>
                               <dd>
                                 Set the dictionary member on <var>normalizedAlgorithm</var> with key
                                 name <var>key</var> to a <a
-                                href="#concept-clone-CryptoOperationData">clone of
+                                href="#concept-clone-BufferSource">clone of
                                 <var>idlValue</var></a>, replacing the current value.
                               </dd>
                               <dt>
@@ -6681,7 +6682,7 @@
           <x:codeblock language="idl">
 dictionary <dfn id="dfn-RsaOaepParams">RsaOaepParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
 <span class="comment">// The optional label/application data to associate with the message</span>
-CryptoOperationData <dfn id="dfn-RsaOaepParams-label">label</dfn>;
+BufferSource <dfn id="dfn-RsaOaepParams-label">label</dfn>;
 };
           </x:codeblock>
         </div>
@@ -11547,7 +11548,7 @@
 // incrementing function specified in NIST SP 800-38A Appendix B.1:
 // the counter bits are interpreted as a big-endian integer and
 // incremented by one.</span>
-required CryptoOperationData <dfn id="dfn-AesCtrParams-counter">counter</dfn>;
+required BufferSource <dfn id="dfn-AesCtrParams-counter">counter</dfn>;
 <span class="comment">// The length, in bits, of the rightmost part of the counter block
 // that is incremented.</span>
 [EnforceRange] required octet <dfn id="dfn-AesCtrParams-length">length</dfn>;
@@ -12126,7 +12127,7 @@
           <x:codeblock language="idl">
 dictionary <dfn id="dfn-AesCbcParams">AesCbcParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
 <span class="comment">// The initialization vector. <span class="RFC2119">MUST</span> be 16 bytes.</span>
-required CryptoOperationData <dfn id="dfn-AesCbcParams-iv">iv</dfn>;
+required BufferSource <dfn id="dfn-AesCbcParams-iv">iv</dfn>;
 };
           </x:codeblock>
         </div>
@@ -13171,9 +13172,9 @@
           <x:codeblock language="idl">
 dictionary <dfn id="dfn-AesGcmParams">AesGcmParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
 <span class="comment">// The initialization vector to use. May be up to 2^64-1 bytes long.</span>
-required CryptoOperationData <dfn id="dfn-AesGcmParams-iv">iv</dfn>;
+required BufferSource <dfn id="dfn-AesGcmParams-iv">iv</dfn>;
 <span class="comment">// The additional authentication data to include.</span>
-CryptoOperationData <dfn id="dfn-AesGcmParams-additionalData">additionalData</dfn>;
+BufferSource <dfn id="dfn-AesGcmParams-additionalData">additionalData</dfn>;
 <span class="comment">// The desired length of the authentication tag. May be 0 - 128.</span>
 [EnforceRange] octet <dfn id="dfn-AesGcmParams-tagLength">tagLength</dfn>;
 };
@@ -13803,7 +13804,7 @@
           <x:codeblock language="idl">
 dictionary <dfn id="dfn-AesCfbParams">AesCfbParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
 <span class="comment">// The initialization vector. <span class="RFC2119">MUST</span> be 16 bytes.</span>
-required CryptoOperationData <dfn id="dfn-AesCfbParams-iv">iv</dfn>;
+required BufferSource <dfn id="dfn-AesCfbParams-iv">iv</dfn>;
 };
           </x:codeblock>
         </div>
@@ -16601,15 +16602,15 @@
 <span class="comment">// A bit string corresponding to the AlgorithmId field of the OtherInfo parameter.</span>
 <span class="comment">// The AlgorithmId indicates how the derived keying material will be parsed and for which</span>
 <span class="comment">// algorithm(s) the derived secret keying material will be used.</span>
-required CryptoOperationData <dfn id="dfn-ConcatParams-algorithmId">algorithmId</dfn>;
+required BufferSource <dfn id="dfn-ConcatParams-algorithmId">algorithmId</dfn>;
 <span class="comment">// A bit string that corresponds to the PartyUInfo field of the OtherInfo parameter.</span>
-required CryptoOperationData <dfn id="dfn-ConcatParams-partyUInfo">partyUInfo</dfn>;
+required BufferSource <dfn id="dfn-ConcatParams-partyUInfo">partyUInfo</dfn>;
 <span class="comment">// A bit string that corresponds to the PartyVInfo field of the OtherInfo parameter.</span>
-required CryptoOperationData <dfn id="dfn-ConcatParams-partyVInfo">partyVInfo</dfn>;
+required BufferSource <dfn id="dfn-ConcatParams-partyVInfo">partyVInfo</dfn>;
 <span class="comment">// An optional bit string that corresponds to the SuppPubInfo field of the OtherInfo parameter.</span>
-CryptoOperationData <dfn id="dfn-ConcatParams-publicInfo">publicInfo</dfn>;
+BufferSource <dfn id="dfn-ConcatParams-publicInfo">publicInfo</dfn>;
 <span class="comment">// An optional bit string that corresponds to the SuppPrivInfo field of the OtherInfo parameter.</span>
-CryptoOperationData <dfn id="dfn-ConcatParams-privateInfo">privateInfo</dfn>;
+BufferSource <dfn id="dfn-ConcatParams-privateInfo">privateInfo</dfn>;
 };
           </x:codeblock>
         </div>
@@ -16822,9 +16823,9 @@
 <span class="comment">// The algorithm to use with HMAC (e.g.: <a href="#sha-256">SHA-256</a>)</span>
 required <a href="#dfn-HashAlgorithmIdentifier">HashAlgorithmIdentifier</a> <dfn id="dfn-HkdfCtrParams-hash">hash</dfn>;
 <span class="comment">// A bit string that corresponds to the label that identifies the purpose for the derived keying material.</span>
-required CryptoOperationData <dfn id="dfn-HkdfCtrParams-label">label</dfn>;
+required BufferSource <dfn id="dfn-HkdfCtrParams-label">label</dfn>;
 <span class="comment">// A bit string that corresponds to the context of the key derivation, as described in Section 5 of NIST SP 800-108 [<a href="#SP800-108">SP800-108</a>]</span>
-required CryptoOperationData <dfn id="dfn-HkdfCtrParams-context">context</dfn>;
+required BufferSource <dfn id="dfn-HkdfCtrParams-context">context</dfn>;
 };
           </x:codeblock>
           <div class="ednote">
@@ -17090,7 +17091,7 @@
           <h4>Pbkdf2Params dictionary</h4>
           <x:codeblock language="idl">
 dictionary <dfn id="dfn-Pbkdf2Params">Pbkdf2Params</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
-required CryptoOperationData <dfn id="dfn-Pbkdf2Params-salt">salt</dfn>;
+required BufferSource <dfn id="dfn-Pbkdf2Params-salt">salt</dfn>;
 [EnforceRange] required unsigned long <dfn id="dfn-Pbkdf2Params-iterations">iterations</dfn>;
 required <a href="#dfn-HashAlgorithmIdentifier">HashAlgorithmIdentifier</a> <dfn id="dfn-Pbkdf2Params-hash">hash</dfn>;
 };
--- a/spec/Overview.html	Wed Oct 22 15:50:08 2014 -0700
+++ b/spec/Overview.html	Mon Oct 27 14:45:16 2014 -0700
@@ -28,7 +28,7 @@
   <link rel="stylesheet" href="//www.w3.org/StyleSheets/TR/W3C-ED" type="text/css" /></head>
 
   <body>
-    <div class="head"><div><a href="http://www.w3.org/"><img src="//www.w3.org/Icons/w3c_home" width="72" height="48" alt="W3C" /></a></div><h1>Web Cryptography API</h1><h2>W3C Editor’s Draft <em>22 October 2014</em></h2><dl><dt>Latest Editor’s Draft:</dt><dd><a href="http://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html">http://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html</a></dd><dt>Latest Published Version:</dt><dd><a href="http://www.w3.org/TR/WebCryptoAPI/">http://www.w3.org/TR/WebCryptoAPI/</a></dd><dt>Previous Version(s):</dt><dd><a href="https://dvcs.w3.org/hg/webcrypto-api/raw-file/0fe9b34c13fb/spec/Overview.html">https://dvcs.w3.org/hg/webcrypto-api/raw-file/0fe9b34c13fb/spec/Overview.html</a></dd><dt>Editors:</dt><dd><a href="http://www.google.com/">Ryan Sleevi</a>, Google, Inc. &lt;[email protected]&gt;</dd><dd><a href="http://www.netflix.com/">Mark Watson</a>, Netflix &lt;[email protected]&gt;</dd><dt>Participate:</dt><dd><p>Send feedback to <a href="mailto:[email protected]?subject=%5BWebCryptoAPI%5D">[email protected]</a> (<a href="http://lists.w3.org/Archives/Public/public-webcrypto/">archives</a>), or <a href="https://www.w3.org/Bugs/Public/enter_bug.cgi?product=Web%20Cryptography&amp;component=Web%20Cryptography%20API%20Document">file a bug</a> 
+    <div class="head"><div><a href="http://www.w3.org/"><img src="//www.w3.org/Icons/w3c_home" width="72" height="48" alt="W3C" /></a></div><h1>Web Cryptography API</h1><h2>W3C Editor’s Draft <em>27 October 2014</em></h2><dl><dt>Latest Editor’s Draft:</dt><dd><a href="http://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html">http://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html</a></dd><dt>Latest Published Version:</dt><dd><a href="http://www.w3.org/TR/WebCryptoAPI/">http://www.w3.org/TR/WebCryptoAPI/</a></dd><dt>Previous Version(s):</dt><dd><a href="https://dvcs.w3.org/hg/webcrypto-api/raw-file/0fe9b34c13fb/spec/Overview.html">https://dvcs.w3.org/hg/webcrypto-api/raw-file/0fe9b34c13fb/spec/Overview.html</a></dd><dt>Editors:</dt><dd><a href="http://www.google.com/">Ryan Sleevi</a>, Google, Inc. &lt;[email protected]&gt;</dd><dd><a href="http://www.netflix.com/">Mark Watson</a>, Netflix &lt;[email protected]&gt;</dd><dt>Participate:</dt><dd><p>Send feedback to <a href="mailto:[email protected]?subject=%5BWebCryptoAPI%5D">[email protected]</a> (<a href="http://lists.w3.org/Archives/Public/public-webcrypto/">archives</a>), or <a href="https://www.w3.org/Bugs/Public/enter_bug.cgi?product=Web%20Cryptography&amp;component=Web%20Cryptography%20API%20Document">file a bug</a> 
     (see <a href="https://www.w3.org/Bugs/Public/buglist.cgi?product=Web%20Cryptography&amp;component=Web%20Cryptography%20API%20Document&amp;resolution=---">existing bugs</a>).</p></dd></dl><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> &copy; view <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>&reg;</sup> (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="http://www.ercim.org/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.</p></div><hr />
 
     <div class="section">
@@ -56,7 +56,7 @@
         report can be found in the <a href="http://www.w3.org/TR/">W3C technical
           reports index</a> at http://www.w3.org/TR/.
       </em></p><p>
-        This document is the 22 October 2014 <b>Editor’s Draft</b> of the
+        This document is the 27 October 2014 <b>Editor’s Draft</b> of the
         <cite>Web Cryptography API</cite> specification.
       
       Please send comments about this document to
@@ -677,6 +677,9 @@
           are defined by the HTML specification [<a href="#HTML">HTML</a>].
         </p>
         <p>
+          The term <dfn id="BufferSource">BufferSource</dfn> is defined in [<cite><a href="#WebIDL">WEBIDL</a></cite>].
+        </p>
+        <p>
           An <dfn id="dfn-octet-string">octet string</dfn> is an ordered sequence of zero or more
           integers, each in the range 0 to 255 inclusive.
         </p>
@@ -800,8 +803,8 @@
           </li>
         </ol>
         <p>
-          When this specification says to <dfn id="concept-clone-CryptoOperationData">clone the
-          data</dfn> of a <a href="#dfn-CryptoOperationData">CryptoOperationData</a> object
+          When this specification says to <dfn id="concept-clone-BufferSource">clone the
+          data</dfn> of a <a href="http://heycam.github.io/webidl/#common-BufferSource">BufferSource</a> object
           <var>data</var>, the user agent must run the following steps:
         </p>
         <dl class="switch">
@@ -1219,25 +1222,23 @@
         <div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
 typedef DOMString <a href="#dfn-KeyFormat"><code>KeyFormat</code></a>;
 
-typedef (ArrayBuffer or ArrayBufferView) CryptoOperationData;
-
 [Exposed=(Window,Worker)]
 interface <dfn id="dfn-SubtleCrypto">SubtleCrypto</dfn> {
   Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-encrypt">encrypt</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
                        <a href="#dfn-CryptoKey">CryptoKey</a> key,
-                       CryptoOperationData data);
+                       BufferSource data);
   Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-decrypt">decrypt</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
                        <a href="#dfn-CryptoKey">CryptoKey</a> key,
-                       CryptoOperationData data);
+                       BufferSource data);
   Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-sign">sign</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
                     <a href="#dfn-CryptoKey">CryptoKey</a> key,
-                    CryptoOperationData data);
+                    BufferSource data);
   Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-verify">verify</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
                       <a href="#dfn-CryptoKey">CryptoKey</a> key,
-                      CryptoOperationData signature,
-                      CryptoOperationData data);
+                      BufferSource signature,
+                      BufferSource data);
   Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-digest">digest</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
-                      CryptoOperationData data);
+                      BufferSource data);
 
   Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-generateKey">generateKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
                           boolean extractable,
@@ -1253,7 +1254,7 @@
   
   <span class="comment">// TBD: <a href="https://www.w3.org/2012/webcrypto/track/issues/35">ISSUE-35</a></span>
   Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-importKey">importKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
-                         (CryptoOperationData or JsonWebKey) keyData,
+                         (BufferSource or JsonWebKey) keyData,
                          <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
                          boolean extractable,
                          sequence&lt;<a href="#dfn-KeyUsage">KeyUsage</a>&gt; keyUsages );
@@ -1264,7 +1265,7 @@
                        <a href="#dfn-CryptoKey">CryptoKey</a> wrappingKey,
                        <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> wrapAlgorithm);
   Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-unwrapKey">unwrapKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
-                         CryptoOperationData wrappedKey,
+                         BufferSource wrappedKey,
                          <a href="#dfn-CryptoKey">CryptoKey</a> unwrappingKey,
                          <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> unwrapAlgorithm,
                          <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> unwrappedKeyAlgorithm,
@@ -1362,7 +1363,7 @@
               </li>
               <li>
                 <p>
-                  Let <var>data</var> be the result of <a href="#concept-clone-CryptoOperationData">
+                  Let <var>data</var> be the result of <a href="#concept-clone-BufferSource">
                   cloning the data</a> of the <code>data</code> parameter passed to the
                   <a href="#dfn-SubtleCrypto-method-encrypt">encrypt</a> method.
                 </p>
@@ -1450,7 +1451,7 @@
               </li>
               <li>
                 <p>
-                  Let <var>data</var> be the result of <a href="#concept-clone-CryptoOperationData">
+                  Let <var>data</var> be the result of <a href="#concept-clone-BufferSource">
                   cloning the data</a> of the <code>data</code> parameter passed to the
                   <a href="#dfn-SubtleCrypto-method-decrypt">decrypt</a> method.
                 </p>
@@ -1538,7 +1539,7 @@
               </li>
               <li>
                 <p>
-                  Let <var>data</var> be the result of <a href="#concept-clone-CryptoOperationData">
+                  Let <var>data</var> be the result of <a href="#concept-clone-BufferSource">
                   cloning the data</a> of the <code>data</code> parameter passed to the
                   <a href="#dfn-SubtleCrypto-method-sign">sign</a> method.
                 </p>
@@ -1624,7 +1625,7 @@
               </li>
               <li>
                 <p>
-                  Let <var>signature</var> be the result of <a href="#concept-clone-CryptoOperationData">
+                  Let <var>signature</var> be the result of <a href="#concept-clone-BufferSource">
                   cloning the data</a> of the <code>signature</code> parameter passed to the
                   <a href="#dfn-SubtleCrypto-method-verify">verify</a> method.
                 </p>
@@ -1645,7 +1646,7 @@
               </li>
               <li>
                 <p>
-                  Let <var>data</var> be the result of <a href="#concept-clone-CryptoOperationData">
+                  Let <var>data</var> be the result of <a href="#concept-clone-BufferSource">
                   cloning the data</a> of the <code>data</code> parameter passed to the
                   <a href="#dfn-SubtleCrypto-method-verify">verify</a> method.
                 </p>
@@ -1718,7 +1719,7 @@
               </li>
               <li>
                 <p>
-                  Let <var>data</var> be the result of <a href="#concept-clone-CryptoOperationData">
+                  Let <var>data</var> be the result of <a href="#concept-clone-BufferSource">
                   cloning the data</a> of the <code>data</code> parameter passed to the
                   <a href="#dfn-SubtleCrypto-method-digest">digest</a> method.
                 </p>
@@ -2148,7 +2149,7 @@
                       <li>
                         <p>
                           Let <var>keyData</var> be the result of
-                          <a href="#concept-clone-CryptoOperationData">cloning the data</a> of the
+                          <a href="#concept-clone-BufferSource">cloning the data</a> of the
                           <code>keyData</code> parameter passed to the
                           <a href="#dfn-SubtleCrypto-method-importKey">importKey</a> method.
                         </p>
@@ -2538,7 +2539,7 @@
               <li>
                 <p>
                   Let <var>wrappedKey</var> be the result of
-                  <a href="#concept-clone-CryptoOperationData">cloning the data</a> of the
+                  <a href="#concept-clone-BufferSource">cloning the data</a> of the
                   <code>data</code> parameter passed to the
                   <a href="#dfn-SubtleCrypto-method-unwrapKey">unwrapKey</a> method.
                 </p>
@@ -3114,12 +3115,12 @@
                             <dl class="switch">
                               <dt>
                                 If <var>member</var> is of the type
-                                <a href="#dfn-CryptoOperationData">CryptoOperationData</a> and is
+                                <a href="http://heycam.github.io/webidl/#common-BufferSource">BufferSource</a> and is
                                 present:
                               </dt>
                               <dd>
                                 Set the dictionary member on <var>normalizedAlgorithm</var> with key
-                                name <var>key</var> to a <a href="#concept-clone-CryptoOperationData">clone of
+                                name <var>key</var> to a <a href="#concept-clone-BufferSource">clone of
                                 <var>idlValue</var></a>, replacing the current value.
                               </dd>
                               <dt>
@@ -6505,7 +6506,7 @@
           <div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
 dictionary <dfn id="dfn-RsaOaepParams">RsaOaepParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
 <span class="comment">// The optional label/application data to associate with the message</span>
-CryptoOperationData <dfn id="dfn-RsaOaepParams-label">label</dfn>;
+BufferSource <dfn id="dfn-RsaOaepParams-label">label</dfn>;
 };
           </code></pre></div></div>
         </div>
@@ -11152,7 +11153,7 @@
 // incrementing function specified in NIST SP 800-38A Appendix B.1:
 // the counter bits are interpreted as a big-endian integer and
 // incremented by one.</span>
-required CryptoOperationData <dfn id="dfn-AesCtrParams-counter">counter</dfn>;
+required BufferSource <dfn id="dfn-AesCtrParams-counter">counter</dfn>;
 <span class="comment">// The length, in bits, of the rightmost part of the counter block
 // that is incremented.</span>
 [EnforceRange] required octet <dfn id="dfn-AesCtrParams-length">length</dfn>;
@@ -11711,7 +11712,7 @@
           <div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
 dictionary <dfn id="dfn-AesCbcParams">AesCbcParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
 <span class="comment">// The initialization vector. <span class="RFC2119">MUST</span> be 16 bytes.</span>
-required CryptoOperationData <dfn id="dfn-AesCbcParams-iv">iv</dfn>;
+required BufferSource <dfn id="dfn-AesCbcParams-iv">iv</dfn>;
 };
           </code></pre></div></div>
         </div>
@@ -12739,9 +12740,9 @@
           <div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
 dictionary <dfn id="dfn-AesGcmParams">AesGcmParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
 <span class="comment">// The initialization vector to use. May be up to 2^64-1 bytes long.</span>
-required CryptoOperationData <dfn id="dfn-AesGcmParams-iv">iv</dfn>;
+required BufferSource <dfn id="dfn-AesGcmParams-iv">iv</dfn>;
 <span class="comment">// The additional authentication data to include.</span>
-CryptoOperationData <dfn id="dfn-AesGcmParams-additionalData">additionalData</dfn>;
+BufferSource <dfn id="dfn-AesGcmParams-additionalData">additionalData</dfn>;
 <span class="comment">// The desired length of the authentication tag. May be 0 - 128.</span>
 [EnforceRange] octet <dfn id="dfn-AesGcmParams-tagLength">tagLength</dfn>;
 };
@@ -13352,7 +13353,7 @@
           <div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
 dictionary <dfn id="dfn-AesCfbParams">AesCfbParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
 <span class="comment">// The initialization vector. <span class="RFC2119">MUST</span> be 16 bytes.</span>
-required CryptoOperationData <dfn id="dfn-AesCfbParams-iv">iv</dfn>;
+required BufferSource <dfn id="dfn-AesCfbParams-iv">iv</dfn>;
 };
           </code></pre></div></div>
         </div>
@@ -16050,15 +16051,15 @@
 <span class="comment">// A bit string corresponding to the AlgorithmId field of the OtherInfo parameter.</span>
 <span class="comment">// The AlgorithmId indicates how the derived keying material will be parsed and for which</span>
 <span class="comment">// algorithm(s) the derived secret keying material will be used.</span>
-required CryptoOperationData <dfn id="dfn-ConcatParams-algorithmId">algorithmId</dfn>;
+required BufferSource <dfn id="dfn-ConcatParams-algorithmId">algorithmId</dfn>;
 <span class="comment">// A bit string that corresponds to the PartyUInfo field of the OtherInfo parameter.</span>
-required CryptoOperationData <dfn id="dfn-ConcatParams-partyUInfo">partyUInfo</dfn>;
+required BufferSource <dfn id="dfn-ConcatParams-partyUInfo">partyUInfo</dfn>;
 <span class="comment">// A bit string that corresponds to the PartyVInfo field of the OtherInfo parameter.</span>
-required CryptoOperationData <dfn id="dfn-ConcatParams-partyVInfo">partyVInfo</dfn>;
+required BufferSource <dfn id="dfn-ConcatParams-partyVInfo">partyVInfo</dfn>;
 <span class="comment">// An optional bit string that corresponds to the SuppPubInfo field of the OtherInfo parameter.</span>
-CryptoOperationData <dfn id="dfn-ConcatParams-publicInfo">publicInfo</dfn>;
+BufferSource <dfn id="dfn-ConcatParams-publicInfo">publicInfo</dfn>;
 <span class="comment">// An optional bit string that corresponds to the SuppPrivInfo field of the OtherInfo parameter.</span>
-CryptoOperationData <dfn id="dfn-ConcatParams-privateInfo">privateInfo</dfn>;
+BufferSource <dfn id="dfn-ConcatParams-privateInfo">privateInfo</dfn>;
 };
           </code></pre></div></div>
         </div>
@@ -16271,9 +16272,9 @@
 <span class="comment">// The algorithm to use with HMAC (e.g.: <a href="#sha-256">SHA-256</a>)</span>
 required <a href="#dfn-HashAlgorithmIdentifier">HashAlgorithmIdentifier</a> <dfn id="dfn-HkdfCtrParams-hash">hash</dfn>;
 <span class="comment">// A bit string that corresponds to the label that identifies the purpose for the derived keying material.</span>
-required CryptoOperationData <dfn id="dfn-HkdfCtrParams-label">label</dfn>;
+required BufferSource <dfn id="dfn-HkdfCtrParams-label">label</dfn>;
 <span class="comment">// A bit string that corresponds to the context of the key derivation, as described in Section 5 of NIST SP 800-108 [<a href="#SP800-108">SP800-108</a>]</span>
-required CryptoOperationData <dfn id="dfn-HkdfCtrParams-context">context</dfn>;
+required BufferSource <dfn id="dfn-HkdfCtrParams-context">context</dfn>;
 };
           </code></pre></div></div>
           <div class="ednote"><div class="ednoteHeader">Editorial note</div>
@@ -16536,7 +16537,7 @@
           <h4>36.3. Pbkdf2Params dictionary</h4>
           <div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
 dictionary <dfn id="dfn-Pbkdf2Params">Pbkdf2Params</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
-required CryptoOperationData <dfn id="dfn-Pbkdf2Params-salt">salt</dfn>;
+required BufferSource <dfn id="dfn-Pbkdf2Params-salt">salt</dfn>;
 [EnforceRange] required unsigned long <dfn id="dfn-Pbkdf2Params-iterations">iterations</dfn>;
 required <a href="#dfn-HashAlgorithmIdentifier">HashAlgorithmIdentifier</a> <dfn id="dfn-Pbkdf2Params-hash">hash</dfn>;
 };