Skip to content

Commit ae72ee6

Browse files
twisspanva
authored andcommitted
Reorder reading algorithm and data arguments
Read and normalize the algorithm argument(s) before copying the bytes held by data arguments, to enable avoiding the copy if the operation is performed on the same thread (which is currently not possible because the algorithm object getters may modify the data).
1 parent 4143489 commit ae72ee6

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

‎index.html‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -544,14 +544,6 @@ <h4>The decapsulateKey method</h4>
544544
respectively.
545545
</p>
546546
</li>
547-
<li>
548-
<p>
549-
Let |ciphertext| be the result of
550-
[= get a copy of the buffer source |
551-
getting a copy of the bytes held by =] the `ciphertext` parameter passed to the
552-
{{SubtleCrypto/decapsulateKey()}} method.
553-
</p>
554-
</li>
555547
<li>
556548
<p>
557549
Let |normalizedDecapsulationAlgorithm| be the result of
@@ -580,6 +572,14 @@ <h4>The decapsulateKey method</h4>
580572
|normalizedSharedKeyAlgorithm|.
581573
</p>
582574
</li>
575+
<li>
576+
<p>
577+
Let |ciphertext| be the result of
578+
[= get a copy of the buffer source |
579+
getting a copy of the bytes held by =] the `ciphertext` parameter passed to the
580+
{{SubtleCrypto/decapsulateKey()}} method.
581+
</p>
582+
</li>
583583
<li>
584584
<p>
585585
Let |realm| be the [= relevant realm =] of [= this =].
@@ -683,14 +683,6 @@ <h4>The decapsulateBits method</h4>
683683
respectively.
684684
</p>
685685
</li>
686-
<li>
687-
<p>
688-
Let |ciphertext| be the result of
689-
[= get a copy of the buffer source |
690-
getting a copy of the bytes held by =] the `ciphertext` parameter passed to the
691-
{{SubtleCrypto/decapsulateBits()}} method.
692-
</p>
693-
</li>
694686
<li>
695687
<p>
696688
Let |normalizedDecapsulationAlgorithm| be the result of
@@ -705,6 +697,14 @@ <h4>The decapsulateBits method</h4>
705697
|normalizedDecapsulationAlgorithm|.
706698
</p>
707699
</li>
700+
<li>
701+
<p>
702+
Let |ciphertext| be the result of
703+
[= get a copy of the buffer source |
704+
getting a copy of the bytes held by =] the `ciphertext` parameter passed to the
705+
{{SubtleCrypto/decapsulateBits()}} method.
706+
</p>
707+
</li>
708708
<li>
709709
<p>
710710
Let |realm| be the [= relevant realm =] of [= this =].

0 commit comments

Comments
 (0)