Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
sha256Multihash: str => {
const digest = Buffer.from(sha256.digest(str))
return Multihash.encode(digest, 'sha2-256').toString('hex')
},
randInt: max => Math.floor(Math.random() * max),