From d1b3f8033f18bc8f969f1cd0768b6fb2d8705047 Mon Sep 17 00:00:00 2001 From: Andy Trevorah Date: Tue, 4 Sep 2018 17:14:32 +0100 Subject: [PATCH] update profiling crypto example The digest parameter is required as of v6.0.0 --- locale/en/docs/guides/simple-profiling.md | 2 +- locale/ko/docs/guides/simple-profiling.md | 4 ++-- locale/uk/docs/guides/simple-profiling.md | 2 +- locale/zh-cn/docs/guides/simple-profiling.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/locale/en/docs/guides/simple-profiling.md b/locale/en/docs/guides/simple-profiling.md index 0c6ed0fd742d1..5bf106b2204ce 100644 --- a/locale/en/docs/guides/simple-profiling.md +++ b/locale/en/docs/guides/simple-profiling.md @@ -42,7 +42,7 @@ app.get('/newUser', (req, res) => { } const salt = crypto.randomBytes(128).toString('base64'); - const hash = crypto.pbkdf2Sync(password, salt, 10000, 512); + const hash = crypto.pbkdf2Sync(password, salt, 10000, 512, 'sha512'); users[username] = { salt, hash }; diff --git a/locale/ko/docs/guides/simple-profiling.md b/locale/ko/docs/guides/simple-profiling.md index ba57aee4644fa..d432c321026ef 100644 --- a/locale/ko/docs/guides/simple-profiling.md +++ b/locale/ko/docs/guides/simple-profiling.md @@ -69,7 +69,7 @@ app.get('/newUser', (req, res) => { } const salt = crypto.randomBytes(128).toString('base64'); - const hash = crypto.pbkdf2Sync(password, salt, 10000, 512); + const hash = crypto.pbkdf2Sync(password, salt, 10000, 512, 'sha512'); users[username] = { salt, hash }; @@ -92,7 +92,7 @@ app.get('/newUser', (req, res) => { } const salt = crypto.randomBytes(128).toString('base64'); - const hash = crypto.pbkdf2Sync(password, salt, 10000, 512); + const hash = crypto.pbkdf2Sync(password, salt, 10000, 512, 'sha512'); users[username] = { salt, hash }; diff --git a/locale/uk/docs/guides/simple-profiling.md b/locale/uk/docs/guides/simple-profiling.md index 0c6ed0fd742d1..5bf106b2204ce 100644 --- a/locale/uk/docs/guides/simple-profiling.md +++ b/locale/uk/docs/guides/simple-profiling.md @@ -42,7 +42,7 @@ app.get('/newUser', (req, res) => { } const salt = crypto.randomBytes(128).toString('base64'); - const hash = crypto.pbkdf2Sync(password, salt, 10000, 512); + const hash = crypto.pbkdf2Sync(password, salt, 10000, 512, 'sha512'); users[username] = { salt, hash }; diff --git a/locale/zh-cn/docs/guides/simple-profiling.md b/locale/zh-cn/docs/guides/simple-profiling.md index 046fc47588cf4..822050efdcd4a 100644 --- a/locale/zh-cn/docs/guides/simple-profiling.md +++ b/locale/zh-cn/docs/guides/simple-profiling.md @@ -31,7 +31,7 @@ app.get('/newUser', (req, res) => { } const salt = crypto.randomBytes(128).toString('base64'); - const hash = crypto.pbkdf2Sync(password, salt, 10000, 512); + const hash = crypto.pbkdf2Sync(password, salt, 10000, 512, 'sha512'); users[username] = { salt, hash };