/** * [Murmur3](https://en.wikipedia.org/wiki/MurmurHash) - A fast 32-bit hash algorithm optimized for browser environments * Implementation based on the MurmurHash3 algorithm by Austin Appleby * Supports string, ArrayBuffer, and Uint8Array inputs with incremental hashing * * @see https://github.com/aappleby/smhasher * * NOTE: This is a non-cryptographic hash function. * Do not use for security-critical applications. */ export declare class Murmur3 { private static readonly __BYTES_PER_CHUNK__; private static readonly __CHUNK_UNROLL_SIZE__; private static readonly __DATAVIEW_CHUNK_SIZE__; private static readonly __DATAVIEW_THRESHOLD__; private static readonly __M1__; private static readonly __M2__; private static readonly __M3__; private static readonly __M4__; private static readonly __H1_ADD__; private static readonly __H1_MULTIPLY__; private static readonly __F1__; private static readonly __F2__; private static readonly __F3__; private static readonly __F4__; private static readonly __R1__; private static readonly __R2__; private static readonly __R3__; private static readonly __R4__; private static readonly __R5__; private static readonly __R6__; private static readonly __R7__; private static readonly __MASK_16__; private static readonly __MASK_16_SHIFT__; private static readonly __MASK_8__; private static readonly __MASK_8_SHIFT__; private static readonly __BYTE_POS_8__; private static readonly __BYTE_POS_16__; private static readonly __BYTE_POS_24__; private static readonly __isLittleEndian__; /** * Mixes a 32-bit value (k1) according to MurmurHash3 algorithm * * @param k1 - The 32-bit value to mix * @returns The mixed value */ private static __mixK1__; /** * Mixes the hash accumulator (h1) with a processed block (k1) * * @param h1 - Current hash accumulator value * @param k1 - Processed block to mix in * @returns The updated hash accumulator value */ private static __mixH1__; private __h1__; private __k1__; private __remainder__; private __length__; /** * Creates a new Murmur3 hash instance * * @param data - Optional initial data to hash (string, ArrayBuffer, or Uint8Array) * @param seed - Optional seed value (default: 0) */ constructor(data?: string | ArrayBuffer | Uint8Array, seed?: number); /** * Updates the hash with the given data * * @param data - Data to hash (string, ArrayBuffer, or Uint8Array) * @returns This hash instance (for chaining) * @throws TypeError if data is not a supported type */ hash(input: string | ArrayBuffer | Uint8Array): Murmur3; /** * Updates the hash with a string * * @param input - String to hash * @returns This hash instance (for chaining) * @private */ private __processString__; /** * Updates the hash with binary data * * @param bytes - Uint8Array to hash * @returns This hash instance (for chaining) * @private */ private __processBytes__; /** * Finalizes the hash computation and returns the hash value * * @returns The 32-bit hash value */ result(): number; /** * Resets the hash state with an optional new seed * * @param seed - New seed value (default: 0) * @returns This hash instance (for chaining) * @throws TypeError if seed is not a number */ reset(seed?: number): Murmur3; /** * Convenience static method to compute a hash in one call * * @param data - Data to hash (string, ArrayBuffer, or Uint8Array) * @param seed - Optional seed value (default: 0) * @returns The 32-bit hash value */ static hash(data: string | ArrayBuffer | Uint8Array, seed?: number): number; }