docs: function verifyDigest(data, theirDigest) {
    return webcrypto.subtle.digest({ name: "SHA-256" }, data).then(ourDigest => {
      const a = new Uint8Array(ourDigest);
      const b = new Uint8Array(theirDigest);
      let result = 0;
      for (let i = 0; i < theirDigest.byteLength; i += 1) {
        result |= a[i] ^ b[i];
      }
      if (result !== 0) {
        throw new Error("Bad digest");
      }
    });
  }