From 84b9a69ac737c91d62960834e038061d2a34d11e Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Thu, 20 Nov 2025 22:28:21 +0100 Subject: [PATCH] prepare methods for additional KeyFormat enum values --- spec/Overview.html | 56 ++++++++++++++++++---------------------------- 1 file changed, 22 insertions(+), 34 deletions(-) diff --git a/spec/Overview.html b/spec/Overview.html index ab0b050..034fa3f 100644 --- a/spec/Overview.html +++ b/spec/Overview.html @@ -2301,46 +2301,43 @@

The importKey method

  • - If |format| is equal to the string {{KeyFormat/"raw"}}, - {{KeyFormat/"pkcs8"}}, or {{KeyFormat/"spki"}}: + If |format| is equal to the string {{KeyFormat/"jwk"}}:
    1. If the `keyData` parameter passed to the - {{SubtleCrypto/importKey()}} method is a + {{SubtleCrypto/importKey()}} method is not a {{JsonWebKey}} dictionary, [= exception/throw =] a {{TypeError}}.

    2. - Let |keyData| be the result of - [= get a copy of the buffer source | - getting a copy of the bytes held by =] the - `keyData` parameter passed to the + Let |keyData| be the `keyData` parameter passed to the {{SubtleCrypto/importKey()}} method.

    -
    - If |format| is equal to the string {{KeyFormat/"jwk"}}: -
    +
    Otherwise:
    1. If the `keyData` parameter passed to the - {{SubtleCrypto/importKey()}} method is not a + {{SubtleCrypto/importKey()}} method is a {{JsonWebKey}} dictionary, [= exception/throw =] a {{TypeError}}.

    2. - Let |keyData| be the `keyData` parameter passed to the + Let |keyData| be the result of + [= get a copy of the buffer source | + getting a copy of the bytes held by =] the + `keyData` parameter passed to the {{SubtleCrypto/importKey()}} method.

    3. @@ -2515,14 +2512,6 @@

      The exportKey method

    4. -
      - If |format| is equal to the strings {{KeyFormat/"raw"}}, - {{KeyFormat/"pkcs8"}}, or {{KeyFormat/"spki"}}: -
      -
      - Let |result| be the result of [= ArrayBuffer/create | creating =] an {{ArrayBuffer}} - in |realm|, containing |result|. -
      If |format| is equal to the string {{KeyFormat/"jwk"}}:
      @@ -2530,6 +2519,11 @@

      The exportKey method

      Let |result| be the result of converting |result| to an ECMAScript Object in |realm|, as defined by [[WebIDL]].
    +
    Otherwise:
    +
    + Let |result| be the result of [= ArrayBuffer/create | creating =] an {{ArrayBuffer}} + in |realm|, containing |result|. +
  • @@ -2658,13 +2652,6 @@

    The wrapKey method

  • -
    - If |format| is equal to the strings {{KeyFormat/"raw"}}, - {{KeyFormat/"pkcs8"}}, or {{KeyFormat/"spki"}}: -
    -
    - Let |bytes| be |exportedKey|. -
    If |format| is equal to the string {{KeyFormat/"jwk"}}:
    @@ -2685,6 +2672,10 @@

    The wrapKey method

  • +
    Otherwise:
    +
    + Let |bytes| be |exportedKey|. +

    @@ -2886,13 +2877,6 @@

    The unwrapKey method

  • -
    - If |format| is equal to the strings {{KeyFormat/"raw"}}, - {{KeyFormat/"pkcs8"}}, or {{KeyFormat/"spki"}}: -
    -
    - Let |key| be |bytes|. -
    If |format| is equal to the string {{KeyFormat/"jwk"}}:
    @@ -2901,6 +2885,10 @@

    The unwrapKey method

    [= parse a JWK =] algorithm, with |bytes| as the `data` to be parsed. +
    Otherwise:
    +
    + Let |key| be |bytes|. +