Skip to content
This repository has been archived by the owner on Aug 31, 2018. It is now read-only.

Commit

Permalink
doc: reduce keylen in pbkdf2 examples
Browse files Browse the repository at this point in the history
PR-URL: nodejs/node#16203
Refs: nodejs/node#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 addaleax committed Oct 18, 2017
1 parent 933d3fd commit ed3783d
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 @@ -1617,9 +1617,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 @@ -1669,8 +1669,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 ed3783d

Please sign in to comment.