Skip to content

Commit c7e3b0b

Browse files
anlexNgengjiawen
authored andcommitted
doc: align to function signature
PR-URL: #34930 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Ricky Zhou <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
1 parent 6c91991 commit c7e3b0b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/crypto.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2888,12 +2888,12 @@ or types.
28882888
```js
28892889
const crypto = require('crypto');
28902890
// Using the factory defaults.
2891-
crypto.scrypt('secret', 'salt', 64, (err, derivedKey) => {
2891+
crypto.scrypt('password', 'salt', 64, (err, derivedKey) => {
28922892
if (err) throw err;
28932893
console.log(derivedKey.toString('hex')); // '3745e48...08d59ae'
28942894
});
28952895
// Using a custom N parameter. Must be a power of two.
2896-
crypto.scrypt('secret', 'salt', 64, { N: 1024 }, (err, derivedKey) => {
2896+
crypto.scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => {
28972897
if (err) throw err;
28982898
console.log(derivedKey.toString('hex')); // '3745e48...aa39b34'
28992899
});
@@ -2945,10 +2945,10 @@ or types.
29452945
```js
29462946
const crypto = require('crypto');
29472947
// Using the factory defaults.
2948-
const key1 = crypto.scryptSync('secret', 'salt', 64);
2948+
const key1 = crypto.scryptSync('password', 'salt', 64);
29492949
console.log(key1.toString('hex')); // '3745e48...08d59ae'
29502950
// Using a custom N parameter. Must be a power of two.
2951-
const key2 = crypto.scryptSync('secret', 'salt', 64, { N: 1024 });
2951+
const key2 = crypto.scryptSync('password', 'salt', 64, { N: 1024 });
29522952
console.log(key2.toString('hex')); // '3745e48...aa39b34'
29532953
```
29542954

0 commit comments

Comments
 (0)