hash-fn.d.ts 640 B

1234567891011121314151617181920212223
  1. /**
  2. * Options passed to hash functions.
  3. */
  4. export interface IBaseHashOptions {
  5. /**
  6. * Length of the desired hash, in bytes. Note that when encoding the output
  7. * as a string, this is *not* the string length.
  8. */
  9. length?: number;
  10. }
  11. /**
  12. * Default hash length, in bytes, unless otherwise specified.
  13. */
  14. export declare const defaultHashLength = 32;
  15. /**
  16. * A type that can be hashed.
  17. */
  18. export declare type BaseHashInput = Uint8Array | ArrayBuffer | SharedArrayBuffer | ArrayLike<number>;
  19. /**
  20. * Converts the input to an Uint8Array.
  21. * @hidden
  22. */
  23. export declare const inputToArray: (input: BaseHashInput) => Uint8Array;