Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MurmurHash128x64

A murmurhash128x64 implementation of the murmur hash incremental utility

Hierarchy

  • IMurHasherBase
    • MurmurHash128x64

Implements

Index

Constructors

constructor

  • Creates MurmurHash utility.

    The default seed is 0 and the endianness is set to "BE".

    Returns MurmurHash128x64

  • Creates MurmurHash utility.

    If not provided, the endianness is set to "BE".

    Parameters

    • seed: number

      initial murmur hash seed as an unsigned 32-bit integer.

    • Optional endianness: Endianness

      digest byte order: "BE", "LE" or "platform", optional. Default is "BE".

    Returns MurmurHash128x64

  • Creates MurmurHash utility.

    The initial state is taken from the serialized state. Throws an error if serial is incorrect.

    Parameters

    • serial: string | Buffer

      serialized state of the same MurmurHash type.

    • Optional endianness: Endianness

      digest byte order: "BE", "LE" or "platform", optional. Default is "BE".

    Returns MurmurHash128x64

  • Creates MurmurHash utility.

    The initial state is taken from another instance of murmur hash utility. Throws an error if incompatible hash is provided.

    Parameters

    • hash: IMurHasher

      an instance of another MurmurHash.

    • Optional endianness: Endianness

      digest byte order: "BE", "LE" or "platform", optional. Default is "BE".

    Returns MurmurHash128x64

Properties

SERIAL_BYTE_LENGTH

SERIAL_BYTE_LENGTH: number

endianness

endianness: Endianness

isBusy

isBusy: boolean

total

total: number

Static SERIAL_BYTE_LENGTH

SERIAL_BYTE_LENGTH: number

Size in bytes of the serialized hasher.

Methods

copy

digest

  • digest(output: Buffer, offset?: number, length?: number): Buffer
  • digest(outputType?: OutputType): string | Buffer

serialize

  • serialize(output: Buffer, offset?: number): Buffer
  • serialize(): string

toJSON

  • toJSON(): string

update

  • update(data: string | Buffer, encoding: Encoding, callback: function): void
  • update(data: string | Buffer, callback: function): void
  • update(data: string | Buffer, encoding?: Encoding): this
  • Parameters

    • data: string | Buffer
    • encoding: Encoding
    • callback: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns void

  • Parameters

    • data: string | Buffer
    • callback: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns void

  • Parameters

    • data: string | Buffer
    • Optional encoding: Encoding

    Returns this

Generated using TypeDoc