Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas <me@superlukas.com>2017-10-14 17:30:41 +0300
committerMichaël Zasso <targos@protonmail.com>2017-10-18 09:35:15 +0300
commit9eccb8479bd62c311f0cbcf3a910326bf7e173f4 (patch)
treef0040925b6858b9d2c87e525074c00143d18e957 /doc/api/crypto.md
parentcca51f4b0ab9db06a531da40ab5b009d4e321170 (diff)
doc: reduce keylen in pbkdf2 examples
PR-URL: https://github.com/nodejs/node/pull/16203 Refs: https://github.com/nodejs/node/issues/3415 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'doc/api/crypto.md')
-rw-r--r--doc/api/crypto.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/api/crypto.md b/doc/api/crypto.md
index 5596e16e6b4..001b1658462 100644
--- a/doc/api/crypto.md
+++ b/doc/api/crypto.md
@@ -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'
});
```
@@ -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