Skip to content

Commit

Permalink
Add hashMandatoryNQuads to selective disclosure primitives.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlongley authored and msporny committed Aug 3, 2023
1 parent 5d1e7e2 commit e9d9297
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1924,6 +1924,31 @@ <h4>filterAndGroupNquads</h4>
</ol>
</section>

<section>
<h4>hashMandatoryNQuads</h4>

<p>
The following algorithm cryptographically hashes an array of mandatory to
disclose N-Quads using a provided hashing API. The required input is an array of
mandatory to disclose N-Quads (<var>mandatory</var>) and a hashing function
(<var>hasher</var>). A cryptographic hash (<em>mandatoryHash</em>) is produced
as output.
</p>

<ol class="algorithm">
<li>
Initialize `bytes` to the UTF-8 representation of the joined `mandatory`
N-Quads.
</li>
<li>
Initialize `mandatoryHash` to the result of using `hasher` to hash `bytes`.
</li>
<li>
Return `mandatoryHash`.
</li>
</ol>
</section>

</section>

</section>
Expand Down

0 comments on commit e9d9297

Please sign in to comment.