doc: consistent webcrypto node.keyObject format

PR-URL: https://github.com/nodejs/node/pull/37200
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Filip Skokan
2021-02-03 11:56:54 +01:00
parent 88be944747
commit 931c2d161e

View File

@@ -608,10 +608,10 @@ added: v15.0.0
-->
* `format`: {string} Must be one of `'raw'`, `'pkcs8'`, `'spki'`, `'jwk'`, or
`node.keyObject`.
`'node.keyObject'`.
* `key`: {CryptoKey}
* Returns: {Promise} containing {ArrayBuffer}, or, if `format` is
`node.keyObject`, a {KeyObject}.
`'node.keyObject'`, a {KeyObject}.
Exports the given key into the specified format, if supported.
@@ -695,7 +695,7 @@ added: v15.0.0
-->
* `format`: {string} Must be one of `'raw'`, `'pkcs8'`, `'spki'`, `'jwk'`, or
`node.keyObject`.
`'node.keyObject'`.
* `keyData`: {ArrayBuffer|TypedArray|DataView|Buffer|KeyObject}
<!--lint disable maximum-line-length remark-lint-->
* `algorithm`: {RsaHashedImportParams|EcKeyImportParams|HmacImportParams|AesImportParams|Pbkdf2ImportParams|NodeDsaImportParams|NodeDhImportParams|NodeScryptImportParams|NodeEdKeyImportParams}
@@ -1465,7 +1465,7 @@ added: v15.0.0
The Node.js Web Crypto API extends various aspects of the Web Crypto API.
These extensions are consistently identified by prepending names with the
`node.` prefix. For instance, the `node.keyObject` key format can be
`node.` prefix. For instance, the `'node.keyObject'` key format can be
used with the `subtle.exportKey()` and `subtle.importKey()` methods to
convert between a WebCrypto {CryptoKey} object and a Node.js {KeyObject}.