Hasher represents a hashing algorithm implementation that produces as MultihashDigest.

Type Parameters

  • Code extends number = number

Hierarchy

  • MultihashHasher

Properties

Properties

code: Code

Code of the multihash

digest: ((input) => MultihashDigest<Code> | Promise<MultihashDigest<Code>>)

Type declaration

    • (input): MultihashDigest<Code> | Promise<MultihashDigest<Code>>
    • Takes binary input and returns it (multi) hash digest. Return value is either promise of a digest or a digest. This way general use can await while performance critical code may asses return value to decide whether await is needed.

      Parameters

      • input: Uint8Array

      Returns MultihashDigest<Code> | Promise<MultihashDigest<Code>>

name: string

Name of the multihash

Generated using TypeDoc