import { AnyUint8Array, Uint8ArrayBuffer } from "../types.js";
import { HashName } from "../crypto/hashes/Hasher.js";

//#region src/utils/MultiHashEncoder.d.ts
declare class MultiHashEncoder {
  /**
   *
   * Encodes a buffer into a hash
   *
   * @param buffer the buffer that has to be encoded
   * @param hashName the hashing algorithm, 'sha-256'
   *
   * @returns a multihash
   */
  static encode(data: AnyUint8Array, hashName: HashName): Uint8ArrayBuffer;
  /**
   *
   * Decodes the multihash
   *
   * @param data the multihash that has to be decoded
   *
   * @returns object with the data and the hashing algorithm
   */
  static decode(data: AnyUint8Array): {
    data: Uint8ArrayBuffer;
    hashName: string;
  };
  /**
   *
   * Validates if it is a valid mulithash
   *
   * @param data the multihash that needs to be validated
   *
   * @returns a boolean whether the multihash is valid
   */
  static isValid(data: AnyUint8Array): boolean;
}
//#endregion
export { MultiHashEncoder };
//# sourceMappingURL=MultiHashEncoder.d.ts.map