|
|
5 年前 | |
|---|---|---|
| .. | ||
| .npmignore | 5 年前 | |
| README.md | 5 年前 | |
| index.js | 5 年前 | |
| package.json | 5 年前 | |
| test.js | 5 年前 | |
Constant-time comparison algorithm to prevent timing attacks for Node.js. Copied from cryptiles by C J Silverio.
$ npm install secure-compare --save
var compare = require('secure-compare');
compare('hello world', 'hello world').should.equal(true);
compare('你好世界', '你好世界').should.equal(true);
compare('hello', 'not hello').should.equal(false);
$ npm test
secure-compare is released under the MIT license.