package
Securely compare two strings, copied from cryptiles
npm install secure-compareGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Constant-time comparison algorithm to prevent timing attacks for Node.js. Copied from cryptiles by C J Silverio.
$ npm install secure-compare --savevar compare = require('secure-compare');
compare('hello world', 'hello world').should.equal(true);
compare('你好世界', '你好世界').should.equal(true);
compare('hello', 'not hello').should.equal(false);$ npm testsecure-compare is released under the MIT license.