20354f0da475a07b02040778b22ac9fc803c39fec022b1fb4c5acfb74b530fe0.json raw

   1  {"ast":null,"code":"/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { hmac } from '@noble/hashes/hmac';\nimport { concatBytes, randomBytes } from '@noble/hashes/utils';\nimport { weierstrass } from './abstract/weierstrass.js';\n// connects noble-curves to noble-hashes\nexport function getHash(hash) {\n  return {\n    hash,\n    hmac: (key, ...msgs) => hmac(hash, key, concatBytes(...msgs)),\n    randomBytes\n  };\n}\nexport function createCurve(curveDef, defHash) {\n  const create = hash => weierstrass({\n    ...curveDef,\n    ...getHash(hash)\n  });\n  return Object.freeze({\n    ...create(defHash),\n    create\n  });\n}\n//# sourceMappingURL=_shortw_utils.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}