{"version":3,"sources":["jsdelivr-header.js","/npm/scmp@2.1.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAEA,MAAM,OAAS,QAAQ,UACjB,YAAc,QAAQ,qBAU5B,OAAO,QAAU,SAAe,EAAG,GAEjC,IAAK,OAAO,SAAS,KAAO,OAAO,SAAS,GAC1C,MAAM,IAAI,MAAM,kCAKlB,OAAI,EAAE,SAAW,EAAE,SAMf,OAAO,gBACF,OAAO,gBAAgB,EAAG,GAG5B,YAAY,EAAG,GACxB","file":"/npm/scmp@2.1.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/scmp@2.1.0/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict'\n\nconst crypto = require('crypto')\nconst scmpCompare = require('./lib/scmpCompare')\n\n/**\n * Does a constant-time Buffer comparison by not short-circuiting\n * on first sign of non-equivalency.\n *\n * @param {Buffer} a The first Buffer to be compared against the second\n * @param {Buffer} b The second Buffer to be compared against the first\n * @return {Boolean}\n */\nmodule.exports = function scmp (a, b) {\n  // check that both inputs are buffers\n  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n    throw new Error('Both scmp args must be Buffers')\n  }\n\n  // return early here if buffer lengths are not equal since timingSafeEqual\n  // will throw if buffer lengths are not equal\n  if (a.length !== b.length) {\n    return false\n  }\n\n  // use crypto.timingSafeEqual if available (since Node.js v6.6.0),\n  // otherwise use our own scmp-internal function.\n  if (crypto.timingSafeEqual) {\n    return crypto.timingSafeEqual(a, b)\n  }\n\n  return scmpCompare(a, b)\n}\n"]}