hash-reader.d.ts 534 B

1234567891011121314151617
  1. import { BaseHashReader } from '../base/hash-reader';
  2. import { BrowserEncoding } from './encoding';
  3. import { Hash } from './hash';
  4. /**
  5. * A hash reader for WebAssembly targets.
  6. */
  7. export declare class BrowserHashReader extends BaseHashReader<Hash> {
  8. /**
  9. * Converts first 32 bytes of the hash to a string with the given encoding.
  10. */
  11. toString(encoding?: BrowserEncoding): string;
  12. /**
  13. * Converts first 32 bytes of the hash to an array.
  14. */
  15. toArray(): Hash;
  16. protected alloc(bytes: number): Hash;
  17. }