Skip to content

Commit 0803cda

Browse files
Reorder reading algorithm and data arguments (#426)
SHA: 5b57233 Reason: push, by twiss Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 04b0e47 commit 0803cda

1 file changed

Lines changed: 68 additions & 69 deletions

File tree

index.html

Lines changed: 68 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123

124124

125125
<meta name="color-scheme" content="light">
126-
<meta name="revision" content="9d98db771af207ff2270175f71baad350742e4aa">
126+
<meta name="revision" content="5b57233c0a2c01a2638d7aaa427fd80a89b968f2">
127127
<meta name="description" content="This specification describes a JavaScript API for performing basic
128128
cryptographic operations in web applications, such as hashing,
129129
signature generation and verification, and encryption and decryption.
@@ -242,17 +242,17 @@
242242
"id": "x690"
243243
}
244244
},
245-
"gitRevision": "9d98db771af207ff2270175f71baad350742e4aa",
246-
"publishISODate": "2026-01-29T00:00:00.000Z",
247-
"generatedSubtitle": "W3C Editor's Draft 29 January 2026"
245+
"gitRevision": "5b57233c0a2c01a2638d7aaa427fd80a89b968f2",
246+
"publishISODate": "2026-02-26T00:00:00.000Z",
247+
"generatedSubtitle": "W3C Editor's Draft 26 February 2026"
248248
}</script>
249249
<link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2021/W3C-ED"></head>
250250

251251
<body class="h-entry" data-cite="WEBIDL html dom webidl infra encoding"><div class="head">
252252
<p class="logos"><a class="logo" href="https://www.w3.org/"><img crossorigin="" alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2021/logos/W3C" width="72">
253253
</a></p>
254254
<h1 id="title" class="title">Web Cryptography API Level 2</h1>
255-
<p id="w3c-state"><a href="https://www.w3.org/standards/types#ED">W3C Editor's Draft</a> <time class="dt-published" datetime="2026-01-29">29 January 2026</time></p>
255+
<p id="w3c-state"><a href="https://www.w3.org/standards/types#ED">W3C Editor's Draft</a> <time class="dt-published" datetime="2026-02-26">26 February 2026</time></p>
256256
<details open="">
257257
<summary>More details about this document</summary>
258258
<dl>
@@ -1669,13 +1669,6 @@ <h1 id="title" class="title">Web Cryptography API Level 2</h1>
16691669
respectively.
16701670
</p>
16711671
</li>
1672-
<li>
1673-
<p>
1674-
Let <var>data</var> be the result of
1675-
<a data-link-type="dfn" data-lt="get a copy of the buffer source" href="https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy">getting a copy of the bytes held by</a> the <code>data</code> parameter passed to the
1676-
<a data-link-type="idl" data-lt="encrypt()" href="#dfn-SubtleCrypto-method-encrypt" class="internalDFN" id="ref-for-dfn-SubtleCrypto-method-encrypt-3"><code>encrypt</code></a><code>()</code> method.
1677-
</p>
1678-
</li>
16791672
<li>
16801673
<p>
16811674
Let <var>normalizedAlgorithm</var> be the result of
@@ -1690,6 +1683,13 @@ <h1 id="title" class="title">Web Cryptography API Level 2</h1>
16901683
<var>normalizedAlgorithm</var>.
16911684
</p>
16921685
</li>
1686+
<li>
1687+
<p>
1688+
Let <var>data</var> be the result of
1689+
<a data-link-type="dfn" data-lt="get a copy of the buffer source" href="https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy">getting a copy of the bytes held by</a> the <code>data</code> parameter passed to the
1690+
<a data-link-type="idl" data-lt="encrypt()" href="#dfn-SubtleCrypto-method-encrypt" class="internalDFN" id="ref-for-dfn-SubtleCrypto-method-encrypt-3"><code>encrypt</code></a><code>()</code> method.
1691+
</p>
1692+
</li>
16931693
<li>
16941694
<p>
16951695
Let <var>realm</var> be the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm">relevant realm</a> of <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this">this</a>.
@@ -1775,13 +1775,6 @@ <h1 id="title" class="title">Web Cryptography API Level 2</h1>
17751775
respectively.
17761776
</p>
17771777
</li>
1778-
<li>
1779-
<p>
1780-
Let <var>data</var> be the result of
1781-
<a data-link-type="dfn" data-lt="get a copy of the buffer source" href="https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy">getting a copy of the bytes held by</a> the <code>data</code> parameter passed to the
1782-
<a data-link-type="idl" data-lt="decrypt()" href="#dfn-SubtleCrypto-method-decrypt" class="internalDFN" id="ref-for-dfn-SubtleCrypto-method-decrypt-3"><code>decrypt</code></a><code>()</code> method.
1783-
</p>
1784-
</li>
17851778
<li>
17861779
<p>
17871780
Let <var>normalizedAlgorithm</var> be the result of
@@ -1796,6 +1789,13 @@ <h1 id="title" class="title">Web Cryptography API Level 2</h1>
17961789
<var>normalizedAlgorithm</var>.
17971790
</p>
17981791
</li>
1792+
<li>
1793+
<p>
1794+
Let <var>data</var> be the result of
1795+
<a data-link-type="dfn" data-lt="get a copy of the buffer source" href="https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy">getting a copy of the bytes held by</a> the <code>data</code> parameter passed to the
1796+
<a data-link-type="idl" data-lt="decrypt()" href="#dfn-SubtleCrypto-method-decrypt" class="internalDFN" id="ref-for-dfn-SubtleCrypto-method-decrypt-3"><code>decrypt</code></a><code>()</code> method.
1797+
</p>
1798+
</li>
17991799
<li>
18001800
<p>
18011801
Let <var>realm</var> be the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm">relevant realm</a> of <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this">this</a>.
@@ -1881,13 +1881,6 @@ <h1 id="title" class="title">Web Cryptography API Level 2</h1>
18811881
respectively.
18821882
</p>
18831883
</li>
1884-
<li>
1885-
<p>
1886-
Let <var>data</var> be the result of
1887-
<a data-link-type="dfn" data-lt="get a copy of the buffer source" href="https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy">getting a copy of the bytes held by</a> the <code>data</code> parameter passed to the
1888-
<a data-link-type="idl" data-lt="sign()" href="#dfn-SubtleCrypto-method-sign" class="internalDFN" id="ref-for-dfn-SubtleCrypto-method-sign-3"><code>sign</code></a><code>()</code> method.
1889-
</p>
1890-
</li>
18911884
<li>
18921885
<p>
18931886
Let <var>normalizedAlgorithm</var> be the result of
@@ -1902,6 +1895,13 @@ <h1 id="title" class="title">Web Cryptography API Level 2</h1>
19021895
<var>normalizedAlgorithm</var>.
19031896
</p>
19041897
</li>
1898+
<li>
1899+
<p>
1900+
Let <var>data</var> be the result of
1901+
<a data-link-type="dfn" data-lt="get a copy of the buffer source" href="https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy">getting a copy of the bytes held by</a> the <code>data</code> parameter passed to the
1902+
<a data-link-type="idl" data-lt="sign()" href="#dfn-SubtleCrypto-method-sign" class="internalDFN" id="ref-for-dfn-SubtleCrypto-method-sign-3"><code>sign</code></a><code>()</code> method.
1903+
</p>
1904+
</li>
19051905
<li>
19061906
<p>
19071907
Let <var>realm</var> be the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm">relevant realm</a> of <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this">this</a>.
@@ -1987,33 +1987,32 @@ <h1 id="title" class="title">Web Cryptography API Level 2</h1>
19871987
</li>
19881988
<li>
19891989
<p>
1990-
Let <var>signature</var> be the result of
1991-
<a data-link-type="dfn" data-lt="get a copy of the buffer source" href="https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy">getting a copy of the bytes held by</a> the <code>signature</code> parameter passed to the
1992-
<a data-link-type="idl" data-lt="verify()" href="#dfn-SubtleCrypto-method-verify" class="internalDFN" id="ref-for-dfn-SubtleCrypto-method-verify-3"><code>verify</code></a><code>()</code> method.
1990+
Let <var>normalizedAlgorithm</var> be the result of
1991+
<a href="#dfn-normalize-an-algorithm" id="ref-for-dfn-normalize-an-algorithm-4">normalizing an algorithm</a>, with
1992+
<code>alg</code> set to <var>algorithm</var> and <code>op</code> set to
1993+
"<code>verify</code>".
19931994
</p>
19941995
</li>
19951996
<li>
19961997
<p>
1997-
Let <var>data</var> be the result of
1998-
<a data-link-type="dfn" data-lt="get a copy of the buffer source" href="https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy">getting a copy of the bytes held by</a> the <code>data</code> parameter passed to the
1999-
<a data-link-type="idl" data-lt="verify()" href="#dfn-SubtleCrypto-method-verify" class="internalDFN" id="ref-for-dfn-SubtleCrypto-method-verify-4"><code>verify</code></a><code>()</code> method.
1998+
If an error occurred, return a Promise rejected with
1999+
<var>normalizedAlgorithm</var>.
20002000
</p>
20012001
</li>
20022002
<li>
20032003
<p>
2004-
Let <var>normalizedAlgorithm</var> be the result of
2005-
<a href="#dfn-normalize-an-algorithm" id="ref-for-dfn-normalize-an-algorithm-4">normalizing an algorithm</a>, with
2006-
<code>alg</code> set to <var>algorithm</var> and <code>op</code> set to
2007-
"<code>verify</code>".
2004+
Let <var>signature</var> be the result of
2005+
<a data-link-type="dfn" data-lt="get a copy of the buffer source" href="https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy">getting a copy of the bytes held by</a> the <code>signature</code> parameter passed to the
2006+
<a data-link-type="idl" data-lt="verify()" href="#dfn-SubtleCrypto-method-verify" class="internalDFN" id="ref-for-dfn-SubtleCrypto-method-verify-3"><code>verify</code></a><code>()</code> method.
20082007
</p>
20092008
</li>
20102009
<li>
20112010
<p>
2012-
If an error occurred, return a Promise rejected with
2013-
<var>normalizedAlgorithm</var>.
2011+
Let <var>data</var> be the result of
2012+
<a data-link-type="dfn" data-lt="get a copy of the buffer source" href="https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy">getting a copy of the bytes held by</a> the <code>data</code> parameter passed to the
2013+
<a data-link-type="idl" data-lt="verify()" href="#dfn-SubtleCrypto-method-verify" class="internalDFN" id="ref-for-dfn-SubtleCrypto-method-verify-4"><code>verify</code></a><code>()</code> method.
20142014
</p>
20152015
</li>
2016-
20172016
<li>
20182017
<p>
20192018
Let <var>realm</var> be the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm">relevant realm</a> of <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this">this</a>.
@@ -2092,13 +2091,6 @@ <h1 id="title" class="title">Web Cryptography API Level 2</h1>
20922091
<a data-link-type="idl" data-lt="digest()" href="#dfn-SubtleCrypto-method-digest" class="internalDFN" id="ref-for-dfn-SubtleCrypto-method-digest-2"><code>digest</code></a><code>()</code> method.
20932092
</p>
20942093
</li>
2095-
<li>
2096-
<p>
2097-
Let <var>data</var> be the result of
2098-
<a data-link-type="dfn" data-lt="get a copy of the buffer source" href="https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy">getting a copy of the bytes held by</a> the <code>data</code> parameter passed to the
2099-
<a data-link-type="idl" data-lt="digest()" href="#dfn-SubtleCrypto-method-digest" class="internalDFN" id="ref-for-dfn-SubtleCrypto-method-digest-3"><code>digest</code></a><code>()</code> method.
2100-
</p>
2101-
</li>
21022094
<li>
21032095
<p>
21042096
Let <var>normalizedAlgorithm</var> be the result of
@@ -2113,6 +2105,13 @@ <h1 id="title" class="title">Web Cryptography API Level 2</h1>
21132105
<var>normalizedAlgorithm</var>.
21142106
</p>
21152107
</li>
2108+
<li>
2109+
<p>
2110+
Let <var>data</var> be the result of
2111+
<a data-link-type="dfn" data-lt="get a copy of the buffer source" href="https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy">getting a copy of the bytes held by</a> the <code>data</code> parameter passed to the
2112+
<a data-link-type="idl" data-lt="digest()" href="#dfn-SubtleCrypto-method-digest" class="internalDFN" id="ref-for-dfn-SubtleCrypto-method-digest-3"><code>digest</code></a><code>()</code> method.
2113+
</p>
2114+
</li>
21162115
<li>
21172116
<p>
21182117
Let <var>realm</var> be the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm">relevant realm</a> of <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this">this</a>.
@@ -2545,6 +2544,20 @@ <h1 id="title" class="title">Web Cryptography API Level 2</h1>
25452544
<code>extractable</code> and <code>keyUsages</code> parameters passed to the <a data-link-type="idl" data-lt="importKey()" href="#dfn-SubtleCrypto-method-importKey" class="internalDFN" id="ref-for-dfn-SubtleCrypto-method-importKey-2"><code>importKey</code></a><code>()</code> method, respectively.
25462545
</p>
25472546
</li>
2547+
<li>
2548+
<p>
2549+
Let <var>normalizedAlgorithm</var> be the result of
2550+
<a href="#dfn-normalize-an-algorithm" id="ref-for-dfn-normalize-an-algorithm-11">normalizing an algorithm</a>, with
2551+
<code>alg</code> set to <var>algorithm</var> and <code>op</code> set to
2552+
"<code>importKey</code>".
2553+
</p>
2554+
</li>
2555+
<li>
2556+
<p>
2557+
If an error occurred, return a Promise rejected with
2558+
<var>normalizedAlgorithm</var>.
2559+
</p>
2560+
</li>
25482561
<li>
25492562
<dl class="switch">
25502563
<dt>
@@ -2591,20 +2604,6 @@ <h1 id="title" class="title">Web Cryptography API Level 2</h1>
25912604
</dd>
25922605
</dl>
25932606
</li>
2594-
<li>
2595-
<p>
2596-
Let <var>normalizedAlgorithm</var> be the result of
2597-
<a href="#dfn-normalize-an-algorithm" id="ref-for-dfn-normalize-an-algorithm-11">normalizing an algorithm</a>, with
2598-
<code>alg</code> set to <var>algorithm</var> and <code>op</code> set to
2599-
"<code>importKey</code>".
2600-
</p>
2601-
</li>
2602-
<li>
2603-
<p>
2604-
If an error occurred, return a Promise rejected with
2605-
<var>normalizedAlgorithm</var>.
2606-
</p>
2607-
</li>
26082607
<li>
26092608
<p>
26102609
Let <var>realm</var> be the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm">relevant realm</a> of <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this">this</a>.
@@ -2996,7 +2995,7 @@ <h1 id="title" class="title">Web Cryptography API Level 2</h1>
29962995
<em class="rfc2119">MUST</em> perform the following steps:
29972996
</p>
29982997
<ol>
2999-
<li>
2998+
<li>
30002999
<p>
30013000
Let <var>format</var>, <var>unwrappingKey</var>,
30023001
<var>algorithm</var>, <var>unwrappedKeyAlgorithm</var>,
@@ -3009,14 +3008,6 @@ <h1 id="title" class="title">Web Cryptography API Level 2</h1>
30093008
respectively.
30103009
</p>
30113010
</li>
3012-
<li>
3013-
<p>
3014-
Let <var>wrappedKey</var> be the result of
3015-
<a data-link-type="dfn" data-lt="get a copy of the buffer source" href="https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy">getting a copy of the bytes held by</a> the
3016-
<code>wrappedKey</code> parameter passed to the
3017-
<a data-link-type="idl" data-lt="unwrapKey()" href="#dfn-SubtleCrypto-method-unwrapKey" class="internalDFN" id="ref-for-dfn-SubtleCrypto-method-unwrapKey-3"><code>unwrapKey</code></a><code>()</code> method.
3018-
</p>
3019-
</li>
30203011
<li>
30213012
<p>
30223013
Let <var>normalizedAlgorithm</var> be the result of
@@ -3052,6 +3043,14 @@ <h1 id="title" class="title">Web Cryptography API Level 2</h1>
30523043
<var>normalizedKeyAlgorithm</var>.
30533044
</p>
30543045
</li>
3046+
<li>
3047+
<p>
3048+
Let <var>wrappedKey</var> be the result of
3049+
<a data-link-type="dfn" data-lt="get a copy of the buffer source" href="https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy">getting a copy of the bytes held by</a> the
3050+
<code>wrappedKey</code> parameter passed to the
3051+
<a data-link-type="idl" data-lt="unwrapKey()" href="#dfn-SubtleCrypto-method-unwrapKey" class="internalDFN" id="ref-for-dfn-SubtleCrypto-method-unwrapKey-3"><code>unwrapKey</code></a><code>()</code> method.
3052+
</p>
3053+
</li>
30553054
<li>
30563055
<p>
30573056
Let <var>realm</var> be the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm">relevant realm</a> of <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this">this</a>.

0 commit comments

Comments
 (0)