|
il y a 2 ans | |
---|---|---|
.. | ||
.npmignore | il y a 2 ans | |
README.md | il y a 2 ans | |
index.js | il y a 2 ans | |
package.json | il y a 2 ans | |
test.js | il y a 2 ans |
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.