123456789101112131415161718192021 |
- using System;
- namespace Pathfinding.Util {
-
- public class Checksum {
-
-
-
-
- public static uint GetChecksum (byte[] arr, uint hash) {
-
- const int prime = 16777619;
- hash ^= 2166136261U;
- for (int i = 0; i < arr.Length; i++)
- hash = (hash ^ arr[i]) * prime;
- return hash;
- }
- }
- }
|