Socket
Socket
Sign inDemoInstall

secure-compare

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    secure-compare

Securely compare two strings, copied from cryptiles


Version published
Weekly downloads
2.1M
increased by7.35%
Maintainers
1
Install size
2.64 kB
Created
Weekly downloads
 

Readme

Source

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 --save

Usage

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 test

License

secure-compare is released under the MIT license.

Keywords

FAQs

Last updated on 30 Mar 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc