src/index.js
async function Multihashing (buf, alg, length) {
  const digest = await Multihashing.digest(buf, alg, length)
  return multihash.encode(digest, alg, length)
}
async function Multihashing (buf, alg, length) {
  const digest = await Multihashing.digest(buf, alg, length)
  return multihash.encode(digest, alg, length)
}
async function Multihashing ( buf , alg , length ) { const digest = await Multihashing . digest ( buf , alg , length ) return multihash . encode ( digest , alg , length ) }
Hash the given `buf` using the algorithm specified by `alg`.
@param {Buffer} buf - The value to hash.
@param {number|string} alg - The algorithm to use eg 'sha1'
@param {number} [length] - Optionally trim the result to this length.
@returns {Promise<Buffer>}
Hash the given buf using the algorithm specified by alg .