Skip to content

Commit

Permalink
Update profiling crypto example (#1796)
Browse files Browse the repository at this point in the history
The digest parameter is required as of v6.0.0
  • Loading branch information
trevorah authored and lpinca committed Sep 10, 2018
1 parent ae5fdae commit 185e154
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion locale/en/docs/guides/simple-profiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 };

Expand Down
4 changes: 2 additions & 2 deletions locale/ko/docs/guides/simple-profiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand All @@ -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 };

Expand Down
2 changes: 1 addition & 1 deletion locale/uk/docs/guides/simple-profiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 };

Expand Down
2 changes: 1 addition & 1 deletion locale/zh-cn/docs/guides/simple-profiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 };

Expand Down

0 comments on commit 185e154

Please sign in to comment.