/// /** * Class that performs hashing operations using the multihash format. */ export default class Multihash { /** * Hashes the content using the hashing algorithm specified. */ static hash(content: Buffer, hashAlgorithmInMultihashCode: number): Buffer; /** * Encodes the given hash into a multihash with the specified hashing algorithm. */ static encode(hash: Buffer, hashAlgorithmInMultihashCode: number): Buffer; /** * Checks if the given hash is multihash formatted in one of the given accepted hash algorithms. */ static isSupportedHash(hash: Buffer, acceptedHashAlgorithms: number[]): boolean; /** * Checks if the given hash is a multihash with the expected hashing algorithm. */ static isValidHash(hash: Buffer, expectedHashAlgorithmInMultihashCode: number): boolean; }