From b5c74d85fc8a4d5eb418e7094533b6a45975cb76 Mon Sep 17 00:00:00 2001 From: Lukas Date: Sat, 14 Oct 2017 16:30:41 +0200 Subject: [PATCH] doc: reduce keylen in pbkdf2 examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/16203 Refs: https://github.com/nodejs/node/issues/3415 Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Tobias Nießen --- doc/api/crypto.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/crypto.md b/doc/api/crypto.md index fd2213f8b5..6b78ba38e6 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -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' }); ``` @@ -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