Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @stablelib/halfsiphash

Index

Variables

DIGEST_LENGTH: 4 = 4
KEY_LENGTH: 8 = 8

Functions

  • halfSipHash(key: Uint8Array, data: Uint8Array): Uint8Array
  • HalfSipHash-2-4 is an experimental PRF which accepts 64-bit key and variable-length data and returns 32-bit tag.

    It is suitable as a hash function for hash tables (using a random per-table seed as key) to protect against hash-flooding DoS attacks. It can also be used as a fast checksum with a fixed key.

    Do not use it for other cryptographic authentication purposes, since 64-bit key is too small for that!

    HalfSipHash was created by Jean-Philippe Aumasson.

    Parameters

    • key: Uint8Array
    • data: Uint8Array

    Returns Uint8Array

  • halfSipHashNum(k0: number, k1: number, data: Uint8Array): number
  • halfSipHashNum is like halfSipHash, but accepts key as two 32-bit unsigned integers and returns a 32-bit unsigned integer result.

    Parameters

    • k0: number
    • k1: number
    • data: Uint8Array

    Returns number

Generated using TypeDoc