diff --git a/spec/Overview.html b/spec/Overview.html index 7ae6339..ec606c0 100644 --- a/spec/Overview.html +++ b/spec/Overview.html @@ -27,7 +27,7 @@ github: "https://github.com/w3c/webcrypto", shortName: "WebCryptoAPI", group: "webappsec", - xref: ['html', 'dom', 'webidl', 'infra', 'encoding'], + xref: ['html', 'dom', 'webidl', 'infra', 'encoding', 'streams'], localBiblio: { "JWA": { aliasOf: "RFC7518" @@ -1220,6 +1220,19 @@
+ The IterableOfBufferSources type represents objects that conform to the iterable interface, and produce {{BufferSource}} values when iterated over. + The AsyncIterableOfBufferSources type represents objects that conform to the async iterable interface, and produce {{BufferSource}} values when asynchronously iterated over. + This is checked by the calling functions rather than by Web IDL. +
++typedef object IterableOfBufferSources; +typedef object AsyncIterableOfBufferSources; ++
@@ -1254,7 +1267,7 @@
- Let |data| be the result of - [= get a copy of the buffer source | - getting a copy of the bytes held by =] the `data` parameter passed to the + Let |data| be the `data` parameter passed to the {{SubtleCrypto/digest()}} method.
+ Let |bytes| be the result of + [= get a copy of the buffer source | + getting a copy of the bytes held by =] |data|. +
++ Let |bytes| be an empty [= byte sequence =]. +
+
+ Let |iterator| be the result of calling
+ GetIterator(|data|, ASYNC)
.
+
+ If an error occurred, return a Promise rejected with + |iterator|. +
++ [= Queue a microtask =] to perform the remaining steps. +
+
+ While |iterator|.[[\Done]]
is false:
+
+ Let |value| be the result of calling
+ IteratorStepValue(|iterator|)
.
+
+ If an error occurred, reject |promise| with + |value| and then terminate these steps. +
+
+ Let |value| be the result of calling
+ Await(|value|)
.
+
+ If an error occurred, reject |promise| with + |value| and then terminate these steps. +
+
+ If |value| is not a {{BufferSource}},
+ reject |promise| with the result of calling
+ AsyncIteratorClose
+ with |iterator| and a {{TypeError}},
+ and then terminate these steps.
+
+ Append the result of [= get a copy of the buffer source | + getting a copy of the bytes held by =] |value| + to |bytes|. +
+
+ If the |iterator| returned by GetIterator(|data|, ASYNC)
+ is the iterator defined by {{ReadableStream}},
+ the implementation may wish to optimize the steps
+ above, for example by reading the stream directly,
+ and/or transferring
+ the stream to the [= in parallel | parallel =] steps below.
+
+ Return a Promise rejected with a {{TypeError}}. +
+Return |promise| and perform the remaining steps [= in parallel =]. @@ -1873,11 +1990,29 @@
+ Wait until the microtask queued above (if any) completes. +
++ The implementation may wish to compute the hash digest + incrementally, instead of waiting until all data is + available, in order to conserve memory. +
++ If |promise| was rejected with an error, + [= terminate the algorithm =]. +
+Let |digest| be the result of performing the digest operation specified by |normalizedAlgorithm| using - |algorithm|, with |data| + |algorithm|, with |bytes| as |message|.