Skip to content

Commit

Permalink
doc: reduce keylen in pbkdf2 examples
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Lukas authored and targos committed Oct 18, 2017
1 parent cca51f4 commit 9eccb84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -1563,9 +1563,9 @@ Example:

```js
const crypto = require('crypto');
crypto.pbkdf2('secret', 'salt', 100000, 512, 'sha512', (err, derivedKey) => {
crypto.pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => {
if (err) throw err;
console.log(derivedKey.toString('hex')); // '3745e48...aa39b34'
console.log(derivedKey.toString('hex')); // '3745e48...08d59ae'
});
```

Expand Down Expand Up @@ -1615,8 +1615,8 @@ Example:

```js
const crypto = require('crypto');
const key = crypto.pbkdf2Sync('secret', 'salt', 100000, 512, 'sha512');
console.log(key.toString('hex')); // '3745e48...aa39b34'
const key = crypto.pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512');
console.log(key.toString('hex')); // '3745e48...08d59ae'
```

An array of supported digest functions can be retrieved using
Expand Down

0 comments on commit 9eccb84

Please sign in to comment.