md5_file_hasher.d.ts 683 B

12345678910111213141516171819202122232425
  1. export interface HashingResponse {
  2. success: boolean;
  3. result?: string | Int32Array;
  4. }
  5. export declare class Md5FileHasher {
  6. private _callback;
  7. private _async;
  8. private _partSize;
  9. private _reader;
  10. private _md5;
  11. private _part;
  12. private _blob;
  13. constructor(_callback: (r: HashingResponse) => void, // Callback to return the result
  14. _async?: boolean, // Async version is not always available in a web worker
  15. _partSize?: number);
  16. /**
  17. * Hash a blob of data in the worker
  18. * @param blob Data to hash
  19. */
  20. hash(blob: any): void;
  21. private _fail;
  22. private _hashData;
  23. private _processPart;
  24. private _configureReader;
  25. }