You must use node-scrypt .
It has a clear API and good documentation.
var scrypt = require("scrypt");
var scryptParameters = scrypt.params(0.1);
var key = new Buffer("this is a key");
scrypt.hash.config.outputEncoding = "hex";
var hash = scrypt.hash(key, scryptParameters);
console.log("Synchronous result: "+hash);
scrypt.hash.config.keyEncoding = "ascii";
scrypt.hash("ascii encoded key", {N: 1, r:1, p:1}, function(err, result){
console.log("Asynchronous result: "+result);
});
source
share