• 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