src/entity.js
function(b1, b2) {
  var mismatch = 0;
  mismatch |= !(b1 instanceof Buffer);
  mismatch |= !(b2 instanceof Buffer);
  mismatch |= b1.length !== b2.length;
  if (mismatch === 1) {
    return false;
  }
  var n = b1.length;
  for (var i = 0; i < n; i++) {
    mismatch |= b1[i] ^ b2[i];
  }
  return mismatch === 0;
}
function(b1, b2) {
  var mismatch = 0;
  mismatch |= !(b1 instanceof Buffer);
  mismatch |= !(b2 instanceof Buffer);
  mismatch |= b1.length !== b2.length;
  if (mismatch === 1) {
    return false;
  }
  var n = b1.length;
  for (var i = 0; i < n; i++) {
    mismatch |= b1[i] ^ b2[i];
  }
  return mismatch === 0;
}
function ( b1 , b2 ) { var mismatch = 0 ; mismatch |= ! ( b1 instanceof Buffer ) ; mismatch |= ! ( b2 instanceof Buffer ) ; mismatch |= b1 . length !== b2 . length ; if ( mismatch === 1 ) { return false ; } var n = b1 . length ; for ( var i = 0 ; i < n ; i ++ ) { mismatch |= b1 [ i ] ^ b2 [ i ] ; } return mismatch === 0 ; }
Fixed time comparison of two buffers
Fixed time comparison of two buffers