Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface StreamHasher<StreamType>

A function that calculates the hash of a data stream. Determining the hash will consume the stream, so only replayable streams should be provided to an implementation of this interface.

Type parameters

  • StreamType = any

Hierarchy

  • StreamHasher

Callable

  • __call(hashCtor: HashConstructor, stream: StreamType): Promise<Uint8Array>
  • A function that calculates the hash of a data stream. Determining the hash will consume the stream, so only replayable streams should be provided to an implementation of this interface.

    Parameters

    Returns Promise<Uint8Array>