Skip to content

Commit 185e154

Browse files
trevorahlpinca
authored andcommitted
Update profiling crypto example (#1796)
The digest parameter is required as of v6.0.0
1 parent ae5fdae commit 185e154

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

locale/en/docs/guides/simple-profiling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ app.get('/newUser', (req, res) => {
4242
}
4343

4444
const salt = crypto.randomBytes(128).toString('base64');
45-
const hash = crypto.pbkdf2Sync(password, salt, 10000, 512);
45+
const hash = crypto.pbkdf2Sync(password, salt, 10000, 512, 'sha512');
4646

4747
users[username] = { salt, hash };
4848

locale/ko/docs/guides/simple-profiling.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ app.get('/newUser', (req, res) => {
6969
}
7070
7171
const salt = crypto.randomBytes(128).toString('base64');
72-
const hash = crypto.pbkdf2Sync(password, salt, 10000, 512);
72+
const hash = crypto.pbkdf2Sync(password, salt, 10000, 512, 'sha512');
7373
7474
users[username] = { salt, hash };
7575
@@ -92,7 +92,7 @@ app.get('/newUser', (req, res) => {
9292
}
9393

9494
const salt = crypto.randomBytes(128).toString('base64');
95-
const hash = crypto.pbkdf2Sync(password, salt, 10000, 512);
95+
const hash = crypto.pbkdf2Sync(password, salt, 10000, 512, 'sha512');
9696

9797
users[username] = { salt, hash };
9898

locale/uk/docs/guides/simple-profiling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ app.get('/newUser', (req, res) => {
4242
}
4343

4444
const salt = crypto.randomBytes(128).toString('base64');
45-
const hash = crypto.pbkdf2Sync(password, salt, 10000, 512);
45+
const hash = crypto.pbkdf2Sync(password, salt, 10000, 512, 'sha512');
4646

4747
users[username] = { salt, hash };
4848

locale/zh-cn/docs/guides/simple-profiling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ app.get('/newUser', (req, res) => {
3131
}
3232

3333
const salt = crypto.randomBytes(128).toString('base64');
34-
const hash = crypto.pbkdf2Sync(password, salt, 10000, 512);
34+
const hash = crypto.pbkdf2Sync(password, salt, 10000, 512, 'sha512');
3535

3636
users[username] = { salt, hash };
3737

0 commit comments

Comments
 (0)