summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/@npmcli/metavuln-calculator/lib/hash.js
blob: 79c0678c7581af6d738332964b77a26aaf67920d (plain)
1
2
3
4
5
const {createHash} = require('crypto')

module.exports = ({name, source}) => createHash('sha512')
  .update(JSON.stringify([name, source]))
  .digest('base64')