Skip to content

Commit 9eccb84

Browse files
Lukastargos
authored andcommitted
doc: reduce keylen in pbkdf2 examples
PR-URL: #16203 Refs: #3415 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent cca51f4 commit 9eccb84

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/crypto.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,9 +1563,9 @@ Example:
15631563

15641564
```js
15651565
const crypto = require('crypto');
1566-
crypto.pbkdf2('secret', 'salt', 100000, 512, 'sha512', (err, derivedKey) => {
1566+
crypto.pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => {
15671567
if (err) throw err;
1568-
console.log(derivedKey.toString('hex')); // '3745e48...aa39b34'
1568+
console.log(derivedKey.toString('hex')); // '3745e48...08d59ae'
15691569
});
15701570
```
15711571

@@ -1615,8 +1615,8 @@ Example:
16151615

16161616
```js
16171617
const crypto = require('crypto');
1618-
const key = crypto.pbkdf2Sync('secret', 'salt', 100000, 512, 'sha512');
1619-
console.log(key.toString('hex')); // '3745e48...aa39b34'
1618+
const key = crypto.pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512');
1619+
console.log(key.toString('hex')); // '3745e48...08d59ae'
16201620
```
16211621

16221622
An array of supported digest functions can be retrieved using

0 commit comments

Comments
 (0)