Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 57b105c

Browse filesBrowse files
panvaaduh95
authored andcommitted
doc: deprecate CryptoKey use in node:crypto
Refs: #55293 PR-URL: #62321 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 59ac10a commit 57b105c
Copy full SHA for 57b105c

1 file changed

+50Lines changed: 50 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/deprecations.md‎

Copy file name to clipboardExpand all lines: doc/api/deprecations.md
+50Lines changed: 50 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -4381,6 +4381,42 @@ const server = http2.createSecureServer({
43814381
});
43824382
```
43834383
4384+
### DEP0203: Passing `CryptoKey` to `node:crypto` APIs
4385+
4386+
<!-- YAML
4387+
changes:
4388+
- version: REPLACEME
4389+
pr-url: https://github.com/nodejs/node/pull/62321
4390+
description: Documentation-only deprecation.
4391+
-->
4392+
4393+
Type: Documentation-only
4394+
4395+
Passing a [`CryptoKey`][] to `node:crypto` functions is deprecated and
4396+
will throw an error in a future version. This includes
4397+
[`crypto.createPublicKey()`][], [`crypto.createPrivateKey()`][],
4398+
[`crypto.sign()`][], [`crypto.verify()`][],
4399+
[`crypto.publicEncrypt()`][], [`crypto.publicDecrypt()`][],
4400+
[`crypto.privateEncrypt()`][], [`crypto.privateDecrypt()`][],
4401+
[`Sign.prototype.sign()`][], [`Verify.prototype.verify()`][],
4402+
[`crypto.createHmac()`][], [`crypto.createCipheriv()`][],
4403+
[`crypto.createDecipheriv()`][], [`crypto.encapsulate()`][], and
4404+
[`crypto.decapsulate()`][].
4405+
4406+
### DEP0204: `KeyObject.from()` with non-extractable `CryptoKey`
4407+
4408+
<!-- YAML
4409+
changes:
4410+
- version: REPLACEME
4411+
pr-url: https://github.com/nodejs/node/pull/62321
4412+
description: Documentation-only deprecation.
4413+
-->
4414+
4415+
Type: Documentation-only
4416+
4417+
Passing a non-extractable [`CryptoKey`][] to [`KeyObject.from()`][] is
4418+
deprecated and will throw an error in a future version.
4419+
43844420
[DEP0142]: #dep0142-repl_builtinlibs
43854421
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
43864422
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
@@ -4398,15 +4434,19 @@ const server = http2.createSecureServer({
43984434
[`Buffer.from(buffer)`]: buffer.md#static-method-bufferfrombuffer
43994435
[`Buffer.isBuffer()`]: buffer.md#static-method-bufferisbufferobj
44004436
[`Cipheriv`]: crypto.md#class-cipheriv
4437+
[`CryptoKey`]: webcrypto.md#class-cryptokey
44014438
[`Decipheriv`]: crypto.md#class-decipheriv
44024439
[`Duplex.toWeb()`]: stream.md#streamduplextowebstreamduplex-options
44034440
[`Error.isError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/isError
4441+
[`KeyObject.from()`]: crypto.md#static-method-keyobjectfromkey
44044442
[`REPLServer.clearBufferedCommand()`]: repl.md#replserverclearbufferedcommand
44054443
[`ReadStream.open()`]: fs.md#class-fsreadstream
44064444
[`Server.getConnections()`]: net.md#servergetconnectionscallback
44074445
[`Server.listen({fd: <number>})`]: net.md#serverlistenhandle-backlog-callback
4446+
[`Sign.prototype.sign()`]: crypto.md#signsignprivatekey-outputencoding
44084447
[`SlowBuffer`]: buffer.md#class-slowbuffer
44094448
[`String.prototype.toWellFormed`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toWellFormed
4449+
[`Verify.prototype.verify()`]: crypto.md#verifyverifyobject-signature-signatureencoding
44104450
[`WriteStream.open()`]: fs.md#class-fswritestream
44114451
[`assert.CallTracker`]: assert.md#class-assertcalltracker
44124452
[`assert`]: assert.md
@@ -4425,11 +4465,21 @@ const server = http2.createSecureServer({
44254465
[`crypto.createDecipheriv()`]: crypto.md#cryptocreatedecipherivalgorithm-key-iv-options
44264466
[`crypto.createHash()`]: crypto.md#cryptocreatehashalgorithm-options
44274467
[`crypto.createHmac()`]: crypto.md#cryptocreatehmacalgorithm-key-options
4468+
[`crypto.createPrivateKey()`]: crypto.md#cryptocreateprivatekeykey
4469+
[`crypto.createPublicKey()`]: crypto.md#cryptocreatepublickeykey
4470+
[`crypto.decapsulate()`]: crypto.md#cryptodecapsulatekey-ciphertext-callback
4471+
[`crypto.encapsulate()`]: crypto.md#cryptoencapsulatekey-callback
44284472
[`crypto.fips`]: crypto.md#cryptofips
44294473
[`crypto.pbkdf2()`]: crypto.md#cryptopbkdf2password-salt-iterations-keylen-digest-callback
4474+
[`crypto.privateDecrypt()`]: crypto.md#cryptoprivatedecryptprivatekey-buffer
4475+
[`crypto.privateEncrypt()`]: crypto.md#cryptoprivateencryptprivatekey-buffer
4476+
[`crypto.publicDecrypt()`]: crypto.md#cryptopublicdecryptkey-buffer
4477+
[`crypto.publicEncrypt()`]: crypto.md#cryptopublicencryptkey-buffer
44304478
[`crypto.randomBytes()`]: crypto.md#cryptorandombytessize-callback
44314479
[`crypto.scrypt()`]: crypto.md#cryptoscryptpassword-salt-keylen-options-callback
44324480
[`crypto.setEngine()`]: crypto.md#cryptosetengineengine-flags
4481+
[`crypto.sign()`]: crypto.md#cryptosignalgorithm-data-key-callback
4482+
[`crypto.verify()`]: crypto.md#cryptoverifyalgorithm-data-key-signature-callback
44334483
[`decipher.final()`]: crypto.md#decipherfinaloutputencoding
44344484
[`decipher.setAuthTag()`]: crypto.md#deciphersetauthtagbuffer-encoding
44354485
[`dirent.parentPath`]: fs.md#direntparentpath

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.