hash(algorithm, ...buffers) {
    const hash = crypto.createHash(algorithm);
    hash.update(Buffer.concat(buffers));
    return hash.digest();
  }
Calculate a hash of the concatenated buffers with the given algorithm.
@param {string} algorithm - The hash algorithm.
@returns {Buffer} The hash