{"_id":"scrypt.js","_rev":"4617871","name":"scrypt.js","description":"Scrypt in Node.js and in the browser. Fast & simple.","dist-tags":{"latest":"0.3.0"},"maintainers":[{"name":"axic","email":""}],"time":{"modified":"2026-04-10T18:16:46.000Z","created":"2016-02-24T01:36:20.771Z","0.3.0":"2018-12-18T12:54:11.348Z","0.2.1":"2018-12-18T12:36:24.970Z","0.2.0":"2016-04-25T18:00:29.453Z","0.1.0":"2016-02-24T01:36:20.771Z"},"users":{},"author":{"name":"Alex Beregszaszi","email":"alex@rtfs.hu"},"repository":{"type":"git","url":"git+https://github.com/axic/scrypt.js.git"},"versions":{"0.3.0":{"name":"scrypt.js","version":"0.3.0","description":"Scrypt in Node.js and in the browser. Fast & simple.","main":"index.js","scripts":{"lint":"standard","test":"tape ./test/index.js"},"author":{"name":"Alex Beregszaszi","email":"alex@rtfs.hu"},"repository":{"type":"git","url":"git+https://github.com/axic/scrypt.js.git"},"keywords":["crypto","scrypt","hash","kdf"],"license":"MIT","dependencies":{"scryptsy":"^1.2.1","scrypt":"^6.0.2"},"optionalDependencies":{"scrypt":"^6.0.2"},"browser":"js.js","devDependencies":{"standard":"^12.0.0","tape":"^4.9.0"},"gitHead":"df0210a773b60f8982b8b00528d9f1cbb8683c8a","bugs":{"url":"https://github.com/axic/scrypt.js/issues"},"homepage":"https://github.com/axic/scrypt.js#readme","_id":"scrypt.js@0.3.0","_npmVersion":"5.8.0","_nodeVersion":"7.10.1","_npmUser":{"name":"axic","email":"alex@rtfs.hu"},"dist":{"shasum":"6c62d61728ad533c8c376a2e5e3e86d41a95c4c0","size":2828,"noattachment":false,"key":"/scrypt.js/-/scrypt.js-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/scrypt.js/download/scrypt.js-0.3.0.tgz"},"maintainers":[{"name":"axic","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scrypt.js_0.3.0_1545137651195_0.017716172662613827"},"_hasShrinkwrap":false,"publish_time":1545137651348,"_cnpm_publish_time":1545137651348,"_cnpmcore_publish_time":"2021-12-16T12:23:08.804Z"},"0.2.1":{"name":"scrypt.js","version":"0.2.1","description":"Scrypt in Node.js and in the browser. Fast & simple.","main":"node.js","scripts":{"lint":"standard","test":"exit 0"},"author":{"name":"Alex Beregszaszi","email":"alex@rtfs.hu"},"repository":{"type":"git","url":"git+https://github.com/axic/scrypt.js.git"},"keywords":["crypto","scrypt","hash","kdf"],"license":"MIT","dependencies":{"scryptsy":"^1.2.1","scrypt":"^6.0.2"},"browser":"js.js","devDependencies":{"standard":"^12.0.0"},"gitHead":"6f67cdfa536793fba854a339a3d7b5979b019390","bugs":{"url":"https://github.com/axic/scrypt.js/issues"},"homepage":"https://github.com/axic/scrypt.js#readme","_id":"scrypt.js@0.2.1","_npmVersion":"5.8.0","_nodeVersion":"7.10.1","_npmUser":{"name":"axic","email":"alex@rtfs.hu"},"dist":{"shasum":"cc3f751933d6bac7a4bedf5301d7596e8146cdcd","size":2186,"noattachment":false,"key":"/scrypt.js/-/scrypt.js-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/scrypt.js/download/scrypt.js-0.2.1.tgz"},"maintainers":[{"name":"axic","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scrypt.js_0.2.1_1545136584856_0.029815709379262367"},"_hasShrinkwrap":false,"publish_time":1545136584970,"_cnpm_publish_time":1545136584970,"_cnpmcore_publish_time":"2021-12-16T12:23:08.995Z"},"0.2.0":{"name":"scrypt.js","version":"0.2.0","description":"Scrypt in Node.js and in the browser. Fast & simple.","main":"node.js","scripts":{"test":"exit 0"},"author":{"name":"Alex Beregszaszi","email":"alex@rtfs.hu"},"repository":{"type":"git","url":"git+https://github.com/axic/scryptjs.git"},"keywords":["crypto","scrypt","hash","kdf"],"license":"MIT","dependencies":{"scryptsy":"^1.2.1","scrypt":"^6.0.2"},"browser":"js.js","gitHead":"2368199c33f8a4226d41a73b2f40dafe3b497dd2","bugs":{"url":"https://github.com/axic/scryptjs/issues"},"homepage":"https://github.com/axic/scryptjs#readme","_id":"scrypt.js@0.2.0","_shasum":"af8d1465b71e9990110bedfc593b9479e03a8ada","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.1.0","_npmUser":{"name":"axic","email":"alex@rtfs.hu"},"dist":{"shasum":"af8d1465b71e9990110bedfc593b9479e03a8ada","size":2514,"noattachment":false,"key":"/scrypt.js/-/scrypt.js-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/scrypt.js/download/scrypt.js-0.2.0.tgz"},"maintainers":[{"name":"axic","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/scrypt.js-0.2.0.tgz_1461607227159_0.24605823424644768"},"directories":{},"publish_time":1461607229453,"_hasShrinkwrap":false,"_cnpm_publish_time":1461607229453,"_cnpmcore_publish_time":"2021-12-16T12:23:09.219Z"},"0.1.0":{"name":"scrypt.js","version":"0.1.0","description":"Scrypt in Node.js and in the browser. Fast & simple.","main":"node.js","scripts":{"test":"exit 0"},"author":{"name":"Alex Beregszaszi","email":"alex@rtfs.hu"},"repository":{"type":"git","url":"git+https://github.com/axic/scryptjs.git"},"keywords":["crypto","scrypt","hash","kdf"],"license":"MIT","dependencies":{"scryptsy":"1.2.1","scrypt":"6.0.1"},"browser":{"node.js":"js.js"},"gitHead":"5d8bd875075594d1011c8a7e2f52e956c7191852","bugs":{"url":"https://github.com/axic/scryptjs/issues"},"homepage":"https://github.com/axic/scryptjs#readme","_id":"scrypt.js@0.1.0","_shasum":"f939591bbc2c6267838ee032cc3360de1188d2a6","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.1.0","_npmUser":{"name":"axic","email":"alex@rtfs.hu"},"dist":{"shasum":"f939591bbc2c6267838ee032cc3360de1188d2a6","size":2525,"noattachment":false,"key":"/scrypt.js/-/scrypt.js-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/scrypt.js/download/scrypt.js-0.1.0.tgz"},"maintainers":[{"name":"axic","email":""}],"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/scrypt.js-0.1.0.tgz_1456277778068_0.5096605210565031"},"directories":{},"publish_time":1456277780771,"_hasShrinkwrap":false,"_cnpm_publish_time":1456277780771,"_cnpmcore_publish_time":"2021-12-16T12:23:09.430Z"}},"readme":"# scrypt.js\n\nThis purpose of this library is to provide a single interface to both a C and a pure Javascript based scrypt implementation.\nSupports browserify and will select the best option when running under Node or in the browser.\n\nIt is using the following two underlying implementations:\n- [scryptsy](https://github.com/cryptocoinjs/scryptsy) for the pure Javascript implementation\n- [scrypt](https://www.npmjs.com/package/scrypt) for the C version\n\nIt only supports hashing. Doesn't offer an async option and doesn't implement the HMAC format. If you are looking for those,\nplease use the Node `scrypt` library.\n\n## API\n\nThere is only one method returned for hashing using scrypt. All parameters are mandatory except the progress callback:\n- `key` - The key/passphrase. Although it accepts a String, please use a Buffer to avoid problems later.\n- `salt` - The salt. Same as with the `key`, please try to use a Buffer.\n- `n` - Iteration count.\n- `r` - Block size for the underlying hash.\n- `p` - Parallelization factor.\n- `dklen` - The derived key length aka. output size.\n\n## Example usage\n\n```js\n// Load default implementation\nvar scrypt = require('scrypt.js')\n\n// Load specific version\nvar scrypt = require('scrypt.js/js') // pure Javascript\nvar scrypt = require('scrypt.js/node') // C on Node\n\nscrypt(key, salt, n, r, p, dklen, progressCb) // returns Buffer\n```\n\n### The progress callback\n\nThis callback (`progressCb` in the above example) is not available on Node.\n\nEvery 1000 iterations it will return an object with the following properties:\n- `current` - Current iteration number.\n- `total` - Total iterations.\n- `percent` - Progress in percentage (double).\n\n## Other scrypt implementations\n\n- https://www.npmjs.com/package/scrypt: Uses the C implementation (version 1.2.0), both async and async.\n- https://www.npmjs.com/package/scrypt-hash: Uses the C implementation and offers only an async option.\n- https://www.npmjs.com/package/scryptsy: A pure Javacript implementation. Offers a progress callback.\n- https://www.npmjs.com/package/scrypt256-hash: Another C implementation. Doesn't seem to be maintained.\n- https://www.npmjs.com/package/scrypt-jane-hash: Uses an alternative C implementation (called scrypt-jane). Doesn't seem to be maintained.\n- https://www.npmjs.com/package/js-scrypt-em: Emscripten-compiled scrypt 1.1.6. Doesn't seem to be maintained.\n- https://www.npmjs.com/package/js-scrypt: Wraps `js-scrypt-em` and offers sync and async options. Doesn't seem to be maintained.\n","_attachments":{},"homepage":"https://github.com/axic/scrypt.js#readme","bugs":{"url":"https://github.com/axic/scrypt.js/issues"},"license":"MIT"}