native.d.ts 508 B

12345678910111213141516
  1. /// <reference types="node" />
  2. import { IInternalHash } from '../base/index';
  3. export interface INativeReader {
  4. free?(): void;
  5. fill(target: Uint8Array): void;
  6. set_position(position: Buffer): void;
  7. }
  8. export interface INativeHash extends IInternalHash<INativeReader> {
  9. new (hashKey?: Buffer, context?: string): INativeHash;
  10. }
  11. export interface INativeModule {
  12. Hasher: INativeHash;
  13. hash(input: Buffer, length: number): Buffer;
  14. }
  15. declare const native: INativeModule;
  16. export default native;