{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Class xxHash3 | Collections | 2.3.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class xxHash3

    A feature complete hashing API based on xxHash3 (https://github.com/Cyan4973/xxHash)

    Inheritance
    object
    xxHash3
    Namespace: Unity.Collections
    Assembly: solution.dll
    Syntax
    [BurstCompile]
    public static class xxHash3
    Remarks

    Features:

    • Compute 64bits or 128bits hash keys, based on a private key, with an optional given seed value.
    • Hash on buffer (with or without a ulong based seed value)
    • Hash on buffer while copying the data to a destination
    • Use instances of xxHash3.StreamingState to accumulate data to hash in multiple calls, suited for small data, then retrieve the hash key at the end.
    • xxHash3 has several implementation based on the size to hash to ensure best performances
    • We currently have two implementations:
      • A generic one based on Unity.Mathematics, that should always be executed compiled with Burst.
      • An AVX2 based implementation for platforms supporting it, using Burst intrinsics.
    • Whether or not the call site is compiled with burst, the hashing function will be executed by Burst() to ensure optimal performance. () Only when the hashing size justifies such transition.

    Methods

    Name Description
    Hash128(void*, long)

    Compute a 128bits hash of a memory region

    Hash128(void*, long, ulong)

    Compute a 128bits hash of a memory region using a given seed value

    Hash128(void*, void*, long)

    Compute a 128bits hash while copying the data to a destination buffer

    Hash128(void*, void*, long, ulong)

    Compute a 128bits hash while copying the data to a destination buffer using a given seed value

    Hash128<T>(in T)

    Compute a 128bits hash from the contents of the input struct

    Hash64(void*, long)

    Compute a 64bits hash of a memory region

    Hash64(void*, long, ulong)

    Compute a 64bits hash of a memory region using a given seed value

    Hash64<T>(in T)

    Compute a 64bits hash from the contents of the input struct

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)