Show / Hide Table of Contents

Method Hash.Fnv1(+ 4 overloads)


Overload

32-bit FNV-1 hash. Useful for fast hash table and checksum use, not cryptography. Similar to CRC32; faster but creates more collisions.

public static int Fnv1(ReadOnlySpan<char> data)
Parameters
data  (ReadOnlySpan<char>)
Returns
int

Overload(next)

32-bit FNV-1 hash. Useful for fast hash table and checksum use, not cryptography. Similar to CRC32; faster but creates more collisions.

public static int Fnv1(char* data, int lengthChars)
Parameters
data  (char*)
lengthChars  (int)
Returns
int

Overload(next)

32-bit FNV-1 hash. Useful for fast hash table and checksum use, not cryptography. Similar to CRC32; faster but creates more collisions.

public static int Fnv1(ReadOnlySpan<byte> data)
Parameters
data  (ReadOnlySpan<byte>)

Data. See also: System.Runtime.InteropServices.MemoryMarshal.AsBytes<T>, System.Runtime.InteropServices.CollectionsMarshal.AsSpan<T>.

Returns
int

Overload(next)

32-bit FNV-1 hash. Useful for fast hash table and checksum use, not cryptography. Similar to CRC32; faster but creates more collisions.

public static int Fnv1(byte* data, int lengthBytes)
Parameters
data  (byte*)
lengthBytes  (int)
Returns
int

Overload(top)

32-bit FNV-1 hash. Useful for fast hash table and checksum use, not cryptography. Similar to CRC32; faster but creates more collisions.

public static int Fnv1<T>(T data) where T : unmanaged
Parameters
data  (T)
Returns
int
Type Parameters
T