UNPKG

nearfs

Version:

NEARFS is a distributed file system compatible with IPFS that uses the NEAR blockchain as a backend.

11 lines (10 loc) 285 B
async function computeHash(data) { // TODO: If becomes bottleneck, try async version @ronomon/crypto-async const crypto = require('crypto'); const hash = crypto.createHash('sha256'); hash.update(data); return hash.digest(); } module.exports = { computeHash, };