Skip to content

Commit 76146ac

Browse files
committed
Edit 3.3.2 Parse metadata in more detail v4
1 parent ec2ef2e commit 76146ac

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

index.bs

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -357,21 +357,21 @@ spec: SHA2; urlPrefix: http://csrc.nist.gov/publications/fips/fips180-4/fips-180
357357
|metadata| on spaces:
358358
1. Let |hash-with-opt-token-list| be the result of
359359
<a lt="strictly split">splitting</a> |item| on U+003F (?).
360-
2. Let |hash-expression| be the |hash-with-opt-token-list|[0].
360+
2. Let |hash-expression| be |hash-with-opt-token-list|[0].
361361
3. Let |base64-value| be the empty string.
362362
4. Let |hash-expr-token-list| be the result of
363363
<a lt="strictly split">splitting</a> |hash-expression| on U+002D (-).
364-
5. Let |algorithm| be the |hash-expr-token-list|[0].
364+
5. Let |algorithm| be |hash-expr-token-list|[0].
365365
6. If |hash-expr-token-list|[1] <a for=list>exists</a>, set
366-
|base64-value| be the |hash-expr-token-list|[1].
366+
|base64-value| to |hash-expr-token-list|[1].
367367
7. If |algorithm| is not a hash function recognized by the user agent,
368-
[=continue=] the next |item|.
368+
[=continue=].
369369
8. Let |metadata| be the ordered map «["alg" → |algorithm|,
370370
"val" → |base64-value|]».
371371

372-
Note: Since no `options` are not defined(see the
373-
[[#integrity-metadata-description]]), corresponding entry is not set in
374-
|metadata|. If `options` are defined in a future version of the spec,
372+
Note: Since no `options` are defined (see the
373+
[[#integrity-metadata-description]]), a corresponding entry is not set
374+
in |metadata|. If `options` are defined in a future version,
375375
|hash-with-opt-token-list|[1] can be utilized as `options`.
376376

377377
9. <a for=list>Append</a> |metadata| to |result|.
@@ -400,14 +400,12 @@ spec: SHA2; urlPrefix: http://csrc.nist.gov/publications/fips/fips180-4/fips-180
400400

401401
1. Let |parsedMetadata| be the result of
402402
<a href="#parse-metadata">parsing |metadataList|</a>.
403-
2. If |parsedMetadata| is the empty set, return `true`.
403+
2. If |parsedMetadata| [=set/is empty=] set, return `true`.
404404
3. Let |metadata| be the result of <a href="#get-the-strongest-metadata">
405405
getting the strongest metadata from |parsedMetadata|</a>.
406406
4. For each |item| in |metadata|:
407-
1. Let |algorithm| be the |alg| component of
408-
|item|.
409-
2. Let |expectedValue| be the |val| component of
410-
|item|.
407+
1. Let |algorithm| be the |item|["alg"].
408+
2. Let |expectedValue| be the |item|["val"].
411409
3. Let |actualValue| be the result of <a
412410
href="#apply-algorithm-to-response">applying |algorithm| to |bytes|
413411
</a>.

0 commit comments

Comments
 (0)