Version: 2022.1
언어: 한국어
public static void ComputeHash128 (void* data, ulong dataSize, ulong* hash1, ulong* hash2);
public static void ComputeHash128 (void* data, ulong dataSize, Hash128* hash);

파라미터

data Pointer to the data to hash.
dataSize The number of bytes to hash.
hash1 A pointer to store the low 64 bits of the computed hash.
hash2 A pointer to store the high 64 bits of the computed hash.
hash A pointer to the Hash128 to updated with the computed hash.

설명

Compute a 128 bit hash based on a data.

using UnityEngine;

public class HashUtilitiesSample { public void ComputeHash128_ToULong() { unsafe { ulong* message = stackalloc ulong[2]; message[0] = 0x73BC2A67F; message[1] = 0x54B1A5C2C;

ulong h1 = 0; ulong h2 = 0;

HashUnsafeUtilities.ComputeHash128(message, sizeof(ulong) * 2, &h1, &h2); } }

public void ComputeHash128_ToHash128() { unsafe { ulong* message = stackalloc ulong[2]; message[0] = 0x73BC2A67F; message[1] = 0x54B1A5C2C;

Hash128 hash = new Hash128();

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