Skip to content

Commit 2870a73

Browse files
panvaaduh95
authored andcommitted
doc,crypto: update subtle.generateKey and subtle.importKey
PR-URL: #59851 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 1f93913 commit 2870a73

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

doc/api/webcrypto.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -764,9 +764,9 @@ added: v15.0.0
764764
* `keyUsages` {string\[]} See [Key usages][].
765765
* Returns: {Promise} Fulfills with a {CryptoKey|CryptoKeyPair} upon success.
766766

767-
Using the method and parameters provided in `algorithm`, `subtle.generateKey()`
768-
attempts to generate new keying material. Depending the method used, the method
769-
may generate either a single {CryptoKey} or a {CryptoKeyPair}.
767+
Using the parameters provided in `algorithm`, this method
768+
attempts to generate new keying material. Depending on the algorithm used
769+
either a single {CryptoKey} or a {CryptoKeyPair} is generated.
770770

771771
The {CryptoKeyPair} (public and private key) generating algorithms supported
772772
include:
@@ -818,10 +818,11 @@ changes:
818818
* `keyUsages` {string\[]} See [Key usages][].
819819
* Returns: {Promise} Fulfills with a {CryptoKey} upon success.
820820

821-
The `subtle.importKey()` method attempts to interpret the provided `keyData`
821+
This method attempts to interpret the provided `keyData`
822822
as the given `format` to create a {CryptoKey} instance using the provided
823823
`algorithm`, `extractable`, and `keyUsages` arguments. If the import is
824-
successful, the returned promise will be resolved with the created {CryptoKey}.
824+
successful, the returned promise will be resolved with a {CryptoKey}
825+
representation of the key material.
825826

826827
If importing a `'PBKDF2'` key, `extractable` must be `false`.
827828

0 commit comments

Comments
 (0)