Package Exports
- secure-compare
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (secure-compare) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
secure-compare
Constant-time comparison algorithm to prevent timing attacks for Node.js. Copied from cryptiles by C J Silverio.
Installation
$ npm install secure-compare --saveUsage
var compare = require('secure-compare');
compare('hello world', 'hello world').should.equal(true);
compare('你好世界', '你好世界').should.equal(true);
compare('hello', 'not hello').should.equal(false);Tests
$ npm testLicense
secure-compare is released under the MIT license.