@@ -2888,12 +2888,12 @@ or types.
28882888``` js
28892889const 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
29462946const crypto = require (' crypto' );
29472947// Using the factory defaults.
2948- const key1 = crypto .scryptSync (' secret ' , ' salt' , 64 );
2948+ const key1 = crypto .scryptSync (' password ' , ' salt' , 64 );
29492949console .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 });
29522952console .log (key2 .toString (' hex' )); // '3745e48...aa39b34'
29532953```
29542954
0 commit comments