← Back to index
interface HomomorphicHasher

An "incremental" (set homomorphic) hash function based on the "randomize-then-combine" paradigm.

Methods
🔗
insert (...items: Input[]): this

Insert items into the accumulator. Items are hashed and then added to the accumulator.

🔗
remove (...items: Input[]): this

Remove items from the accumulator. Items are hashed and then removed from the accumulator.

🔗
union (other: HomomorphicHasher): this

Compute the union of two accumulators.

🔗
difference (other: HomomorphicHasher): this

Compute the difference of two accumulators.

🔗
digest (): Uint8Array

Compute the digest of the accumulator. This is the finalized hash.

🔗
equals (other: HomomorphicHasher): boolean

Determine if two accumulators are equal.

🔗
clone (): this

Clone the accumulator.