doc,crypto: update subtle.generateKey and subtle.importKey · nodejs/node@026d4e3

Original file line numberDiff line numberDiff line change

@@ -1219,9 +1219,9 @@ changes:

12191219

* `keyUsages` {string\[]} See [Key usages][].

12201220

* Returns: {Promise} Fulfills with a {CryptoKey|CryptoKeyPair} upon success.

12211221
1222-

Using the method and parameters provided in `algorithm`, `subtle.generateKey()`

1223-

attempts to generate new keying material. Depending the method used, the method

1224-

may generate either a single {CryptoKey} or a {CryptoKeyPair}.

1222+

Using the parameters provided in `algorithm`, this method

1223+

attempts to generate new keying material. Depending on the algorithm used

1224+

either a single {CryptoKey} or a {CryptoKeyPair} is generated.

12251225
12261226

The {CryptoKeyPair} (public and private key) generating algorithms supported

12271227

include:

@@ -1296,10 +1296,11 @@ changes:

12961296

* `keyUsages` {string\[]} See [Key usages][].

12971297

* Returns: {Promise} Fulfills with a {CryptoKey} upon success.

12981298
1299-

The [`subtle.importKey()`][] method attempts to interpret the provided `keyData`

1299+

This method attempts to interpret the provided `keyData`

13001300

as the given `format` to create a {CryptoKey} instance using the provided

13011301

`algorithm`, `extractable`, and `keyUsages` arguments. If the import is

1302-

successful, the returned promise will be resolved with the created {CryptoKey}.

1302+

successful, the returned promise will be resolved with a {CryptoKey}

1303+

representation of the key material.

13031304
13041305

If importing KDF algorithm keys, `extractable` must be `false`.

13051306