public static ulong GenerateLocation2(double lat, double lng, double alt, uint hashSeed) { var locationBytes = new List <byte>(); locationBytes.AddRange(BitConverter.GetBytes(lat).Reverse()); locationBytes.AddRange(BitConverter.GetBytes(lng).Reverse()); locationBytes.AddRange(BitConverter.GetBytes(alt).Reverse()); return(NiaHash.compute_hash32(locationBytes.ToArray(), hashSeed)); }
public static ulong GenerateRequestHash(byte[] authTicket, byte[] request, uint hashSeed) { var first_hash = NiaHash.compute_hash64(authTicket, hashSeed); return(NiaHash.compute_hash64(request.ToArray(), first_hash)); }
public int GetLocationHash2(byte[] locationBytes) { return((int)NiaHash.Hash32(locationBytes)); }
public ulong GetRequestHash(byte[] requestBytes, byte[] serializedTicket) { return(NiaHash.Hash64Salt64(requestBytes, NiaHash.Hash64(serializedTicket))); }
public int GetLocationHash1(byte[] locationBytes, byte[] serializedTicket) { return((int)NiaHash.Hash32Salt(locationBytes, NiaHash.Hash32(serializedTicket))); }