public static void ComputeHash128 (ref T value, ref Hash128 hash);

Parameters

valueA reference to the value to hash.
hashA reference to the Hash128 to updated with the computed hash.

Description

Compute a 128 bit hash based on a value. the type of the value must be a value type.

using UnityEngine;
using System.Runtime.InteropServices;

public class HashUtilitiesSample { [StructLayout(LayoutKind.Sequential)] struct TestData { public ulong V1; public ulong V2; }

public void ComputeHash128_ToHash128() { var message = new TestData { V1 = 0x73BC2A67F, V2 = 0x54B1A5C2C };

Hash128 hash = new Hash128(); HashUtilities.ComputeHash128(ref message, ref hash); } }
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961