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 36c118b

Browse filesBrowse files
tniessenRafaelGSS
authored andcommitted
doc: remove use of DEFAULT_ENCODING in PBKDF2 docs
There is no point in documenting this legacy behavior, which will emit a warning when used. PR-URL: #47181 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 5419535 commit 36c118b
Copy full SHA for 36c118b

File tree

Expand file treeCollapse file tree

1 file changed

+0
-40
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-40
lines changed
Open diff view settings
Collapse file

‎doc/api/crypto.md‎

Copy file name to clipboardExpand all lines: doc/api/crypto.md
-40Lines changed: 0 additions & 40 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -4430,28 +4430,6 @@ pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => {
44304430
});
44314431
```
44324432

4433-
The `crypto.DEFAULT_ENCODING` property can be used to change the way the
4434-
`derivedKey` is passed to the callback. This property, however, has been
4435-
deprecated and use should be avoided.
4436-
4437-
```mjs
4438-
import crypto from 'node:crypto';
4439-
crypto.DEFAULT_ENCODING = 'hex';
4440-
crypto.pbkdf2('secret', 'salt', 100000, 512, 'sha512', (err, derivedKey) => {
4441-
if (err) throw err;
4442-
console.log(derivedKey); // '3745e48...aa39b34'
4443-
});
4444-
```
4445-
4446-
```cjs
4447-
const crypto = require('node:crypto');
4448-
crypto.DEFAULT_ENCODING = 'hex';
4449-
crypto.pbkdf2('secret', 'salt', 100000, 512, 'sha512', (err, derivedKey) => {
4450-
if (err) throw err;
4451-
console.log(derivedKey); // '3745e48...aa39b34'
4452-
});
4453-
```
4454-
44554433
An array of supported digest functions can be retrieved using
44564434
[`crypto.getHashes()`][].
44574435

@@ -4521,24 +4499,6 @@ const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512');
45214499
console.log(key.toString('hex')); // '3745e48...08d59ae'
45224500
```
45234501

4524-
The `crypto.DEFAULT_ENCODING` property may be used to change the way the
4525-
`derivedKey` is returned. This property, however, is deprecated and use
4526-
should be avoided.
4527-
4528-
```mjs
4529-
import crypto from 'node:crypto';
4530-
crypto.DEFAULT_ENCODING = 'hex';
4531-
const key = crypto.pbkdf2Sync('secret', 'salt', 100000, 512, 'sha512');
4532-
console.log(key); // '3745e48...aa39b34'
4533-
```
4534-
4535-
```cjs
4536-
const crypto = require('node:crypto');
4537-
crypto.DEFAULT_ENCODING = 'hex';
4538-
const key = crypto.pbkdf2Sync('secret', 'salt', 100000, 512, 'sha512');
4539-
console.log(key); // '3745e48...aa39b34'
4540-
```
4541-
45424502
An array of supported digest functions can be retrieved using
45434503
[`crypto.getHashes()`][].
45444504

0 commit comments

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