Skip to main content

Auki::ConjureKit::Manna::Hashing

Public Functions

Name
uintCrc32IterateHash(byte nextValue, uint prevHash =0xFF)
CRC32 hashing, to be called iterative for each item you want to include in the hash. To finalize the hash (and avalance), call Crc32FinalizeHash on the resulting value.
uintCrc32FinalizeHash(uint hash)
CRC32 hashing finalization, to be called after the iterative hashing with Crc32IterateHash has ended. Call this on the result value To finalize the hash.
uintJenkinsIterateHash(byte nextValue, uint prevHash =0)
Jenkins hashing, to be called iterative for each item you want to include in the hash. To finalize the hash (and avalance), call JenkinsFinalizeHash on the resulting value. Ref: https://en.wikipedia.org/wiki/Jenkins_hash_function.
uintJenkinsFinalizeHash(uint hash)
Jenkins hashing finalization, to be called after the iterative hashing with JenkinsIterateHash has ended. Call this on the result value To finalize the hash (and avalance). Ref: https://en.wikipedia.org/wiki/Jenkins_hash_function.
ulongKnuthIterateHash(byte nextValue, ulong prevHash =0)
Knut hashing, to be called iterative for each item you want to include in the hash. Ref: https://stackoverflow.com/questions/9545619/a-fast-hash-function-for-string-in-c-sharp.

Public Functions Documentation

function Crc32IterateHash

static uint Crc32IterateHash(
byte nextValue,
uint prevHash =0xFF
)

CRC32 hashing, to be called iterative for each item you want to include in the hash. To finalize the hash (and avalance), call Crc32FinalizeHash on the resulting value.

Parameters:

  • nextValue the next value to hash
  • prevHash the previous hash result

Return: The hashed value (not finalized)

function Crc32FinalizeHash

static uint Crc32FinalizeHash(
uint hash
)

CRC32 hashing finalization, to be called after the iterative hashing with Crc32IterateHash has ended. Call this on the result value To finalize the hash.

Parameters:

  • hash the hash result of the iterative hashing

Return: The finalized hash value

function JenkinsIterateHash

static uint JenkinsIterateHash(
byte nextValue,
uint prevHash =0
)

Jenkins hashing, to be called iterative for each item you want to include in the hash. To finalize the hash (and avalance), call JenkinsFinalizeHash on the resulting value. Ref: https://en.wikipedia.org/wiki/Jenkins_hash_function.

Parameters:

  • nextValue the next value to hash
  • prevHash the previous hash result

Return: The hashed value (not finalized)

function JenkinsFinalizeHash

static uint JenkinsFinalizeHash(
uint hash
)

Jenkins hashing finalization, to be called after the iterative hashing with JenkinsIterateHash has ended. Call this on the result value To finalize the hash (and avalance). Ref: https://en.wikipedia.org/wiki/Jenkins_hash_function.

Parameters:

  • hash the hash result of the iterative hashing

Return: The finalized hash value

function KnuthIterateHash

static ulong KnuthIterateHash(
byte nextValue,
ulong prevHash =0
)

Knut hashing, to be called iterative for each item you want to include in the hash. Ref: https://stackoverflow.com/questions/9545619/a-fast-hash-function-for-string-in-c-sharp.

Parameters:

  • nextValue the next value to hash
  • prevHash the previous hash result

Return: The hashed value