GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: remove use of DEFAULT_ENCODING in PBKDF2 docs · nodejs/node@36c118b

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • crypto.md
Expand file treeCollapse file tree
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)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.