:py:mod:`dissect.util.hash.jenkins` =================================== .. py:module:: dissect.util.hash.jenkins Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: :nosignatures: dissect.util.hash.jenkins.lookup8 dissect.util.hash.jenkins.lookup8_quads .. py:function:: lookup8(key: bytes, level: int) -> int Hashes a variable-length key into a 64-bit value. This hash function is used in the ESXi kernel. .. rubric:: References - http://burtleburtle.net/bob/c/lookup8.c .. py:function:: lookup8_quads(key: bytes, level: int) -> int Hashes a key consisting of ``num`` 64-bit integers into a 64-bit value. This hash function is used in the ESXi kernel, but unlike :func:`lookup8`, this variant is not compatible with any of the original ``lookup8.c`` implementations. The difference between this variant and :func:`lookup8` is that in the final step, the value of ``c`` is incremented by the number of quads, not the number of bytes in the key. While ``hash2`` in ``lookup8.c`` is also optimized for 64-bit aligned keys, (and uses the number of quads as argument for the key size, not bytes) it uses the length of the key in bytes to increment ``c`` in the final step. .. rubric:: References - http://burtleburtle.net/bob/c/lookup8.c - ``HashFunc_HashQuads``