Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

buffer-equal-constant-time

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Issues
File Explorer

Advanced tools

buffer-equal-constant-time

Constant-time comparison of Buffers

    1.0.1latest

Version published
Maintainers
1
Weekly downloads
8,854,182
decreased by-19.05%

Weekly downloads

Readme

Source

buffer-equal-constant-time

Constant-time Buffer comparison for node.js. Should work with browserify too.

Build Status

npm install buffer-equal-constant-time

Usage

var bufferEq = require('buffer-equal-constant-time'); var a = new Buffer('asdf'); var b = new Buffer('asdf'); if (bufferEq(a,b)) { // the same! } else { // different in at least one byte! }

If you'd like to install an .equal() method onto the node.js Buffer and SlowBuffer prototypes:

require('buffer-equal-constant-time').install(); var a = new Buffer('asdf'); var b = new Buffer('asdf'); if (a.equal(b)) { // the same! } else { // different in at least one byte! }

To get rid of the installed .equal() method, call .restore():

require('buffer-equal-constant-time').restore();

© 2013 GoInstant Inc., a salesforce.com company

Licensed under the BSD 3-clause license.

Keywords

FAQs

What is buffer-equal-constant-time?

Constant-time comparison of Buffers

Is buffer-equal-constant-time popular?

The npm package buffer-equal-constant-time receives a total of 7,449,188 weekly downloads. As such, buffer-equal-constant-time popularity was classified as popular.

Is buffer-equal-constant-time well maintained?

We found that buffer-equal-constant-time demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 16 Dec 2013

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc