{"name":"scmp","version":"2.1.0","description":"safe, constant-time comparison of Buffers","main":"index.js","scripts":{"pretest":"standard --verbose","test":"mocha","posttest":"node benchmark/benchmark.js && node benchmark/crypto-check.js"},"repository":{"type":"git","url":"git://github.com/freewil/scmp.git"},"keywords":["safe-compare","compare","time-equivalent-comparison","time equivalent","constant-time","constant time"],"author":{"name":"Sean Lavine"},"license":"BSD-3-Clause","devDependencies":{"benchmark":"^2.1.4","mocha":"^6.2.0","safe-buffer":"^5.1.2","standard":"^14.3.1"},"dependencies":{},"gitHead":"be5d22baad3acdd0440eaf98d62c67dab6b04f27","bugs":{"url":"https://github.com/freewil/scmp/issues"},"homepage":"https://github.com/freewil/scmp#readme","_id":"scmp@2.1.0","_nodeVersion":"10.18.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-o/mRQGk9Rcer/jEEw/yw4mwo3EU/NvYvp577/Btqrym9Qy5/MdWGBqipbALgd2lrdWTJ5/gqDusxfnQBxOxT2Q==","shasum":"37b8e197c425bdeb570ab91cc356b311a11f9c9a","tarball":"http://registry-npm.ywwl.com/scmp/download/scmp-2.1.0.tgz","fileCount":10,"unpackedSize":7926,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeBQUzCRA9TVsSAnZWagAAQPUP/0ZwkfVzMQNHTO6S+tEo\n3lCDWbphcfMtgod5KTwSS/7j6i4ikEV8F/pArsCmjjPMGbHpw0ho9RnO04rg\nQ1o+B1xQS8ZB53N+LqasW9vWf6SRRhG7A+lvZk44Vss7scd4kFxglBRjdMZq\nhs7WS2h0OzpecVTeDoSmkDiDNUBcHT0BMbB8YPiV9jh2dbpSWQdxrVPYjz5S\ndkM4HAwVEvRyUUMBqgklKpx9qYjyaDD5BCQShJttCX0DgpMl3izkx8ovW15/\nOFccwadH3ybRWvmDgO2SdUn4qhnYvbQNYLY3byFMgPixxsKNjy1jq1E2kvbi\nItmivoYYMmfN/y7azzxRzNy9RdEC27A6z1fE3ARGcacMFFfBORZ084xhpM4V\njHU2hKsVPlkzvHRwfOjFmpwurIDp3riEpmKKEd0PPjvtPjJJys4cb41o+aY7\nvfisx6uKR0LosGG7mdKBbaneZjzFkPyLzJQUXonrT4aBJOlQtGHjwbFWMkNt\nASz75wdL/JPKoo5oX+hWYRAqTyhLT0hOMNfgcKXwCN4cUCYdpT+O/0+M3MxG\nzuB8dljoTmPTx/8mueoR8hQT3hGQgWd1lRDyQTNbYNzOiyB3P0YvUxf3y8ck\nneybPL7Dee2+2ZlDai0bvAqur9w72U7/9066Cn5BjBA32BISxjWl11pd5bSV\nBVZs\r\n=/X3N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBiG8c01vvtdzNHdcFOBVwZIhQTrDdR1u4MwThKPO1BgAiEA0O3pJ0uv7KzDEovVZTQFJac9vVfWj+iTvXg8lEHv1zM="}],"size":3245,"noattachment":false,"key":"/scmp/-/scmp-2.1.0.tgz"},"maintainers":[{"name":"freewil","email":"sean@eternalrise.com"}],"_npmUser":{"name":"freewil","email":"lavis88@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scmp_2.1.0_1577387314748_0.12475921724071015"},"_hasShrinkwrap":false,"readme":"# scmp\n[![travis][travis-image]][travis-url]\n[![npm][npm-image]][npm-url]\n[![downloads][downloads-image]][downloads-url]\n\n[travis-image]: https://travis-ci.org/freewil/scmp.svg?branch=master\n[travis-url]: https://travis-ci.org/freewil/scmp\n\n[npm-image]: https://img.shields.io/npm/v/scmp.svg?style=flat\n[npm-url]: https://npmjs.org/package/scmp\n\n[downloads-image]: https://img.shields.io/npm/dm/scmp.svg?style=flat\n[downloads-url]: https://npmjs.org/package/scmp\n\nSafe, constant-time comparison of Buffers.\n\n## Install\n\n```\nnpm install scmp\n```\n\n## Why?\n\nTo minimize vulnerability against [timing attacks](http://codahale.com/a-lesson-in-timing-attacks/).\n\n## Example\n\n```js\nconst scmp = require('scmp');\nconst Buffer = require('safe-buffer').Buffer;\n\nconst hash      = Buffer.from('e727d1464ae12436e899a726da5b2f11d8381b26', 'hex');\nconst givenHash = Buffer.from('e727e1b80e448a213b392049888111e1779a52db', 'hex');\n\nif (scmp(hash, givenHash)) {\n  console.log('good hash');\n} else {\n  console.log('bad hash');\n}\n\n```\n","publish_time":1577387314819,"deprecated":"Just use Node.js's crypto.timingSafeEqual()","_cnpm_publish_time":1577387314819,"dist-tags":{"latest":"2.1.0"}}