hash-reader.d.ts 491 B

12345678910111213141516
  1. /// <reference types="node" />
  2. import { BaseHashReader } from '../base/hash-reader';
  3. /**
  4. * A hash reader for WebAssembly targets.
  5. */
  6. export declare class NodeHashReader extends BaseHashReader<Buffer> {
  7. /**
  8. * Converts first 32 bytes of the hash to a string with the given encoding.
  9. */
  10. toString(encoding?: BufferEncoding): string;
  11. /**
  12. * Converts first 32 bytes of the hash to an array.
  13. */
  14. toBuffer(): Buffer;
  15. protected alloc(bytes: number): Buffer;
  16. }