#include <stdint.h>
Go to the source code of this file.
|
| uint64_t | update_crc64 (const void *buf, uint32_t len, uint64_t crc) |
| | Updates a running CRC64 checksum with len bytes from buf.
|
| |
| uint64_t | crc64 (const void *buf, uint32_t len) |
| | Computes the CRC64 of len bytes starting at buf.
|
| |
| uint64_t | CRC64 (const char *t) |
| | Computes the CRC64 of a null-terminated string t.
|
| |
◆ INITIAL_CRC64
| #define INITIAL_CRC64 0xffffffffffffffffULL |
◆ CRC64()
| uint64_t CRC64 |
( |
const char * |
t | ) |
|
|
extern |
Computes the CRC64 of a null-terminated string t.
This is the primary hashing function used by the resource system to map virtual resource paths (char*) to their 64-bit CRC identifiers.
- Parameters
-
| t | Null-terminated string to hash. |
- Returns
- 64-bit CRC hash of
t (excluding the null terminator).
◆ crc64()
| uint64_t crc64 |
( |
const void * |
buf, |
|
|
uint32_t |
len |
|
) |
| |
|
extern |
Computes the CRC64 of len bytes starting at buf.
Equivalent to calling update_crc64() once with INITIAL_CRC64 as the seed.
- Parameters
-
| buf | Pointer to the data to hash. |
| len | Number of bytes in buf. |
- Returns
- 64-bit CRC hash of the input.
◆ update_crc64()
| uint64_t update_crc64 |
( |
const void * |
buf, |
|
|
uint32_t |
len, |
|
|
uint64_t |
crc |
|
) |
| |
|
extern |
Updates a running CRC64 checksum with len bytes from buf.
Use this function to compute the CRC64 of a multi-part message by chaining calls:
uint64_t update_crc64(const void *buf, uint32_t len, uint64_t crc)
Updates a running CRC64 checksum with len bytes from buf.
#define INITIAL_CRC64
Initial CRC64 seed value. Pass to update_crc64() as the starting crc.
Definition StrHash64.h:90
- Parameters
-
| buf | Pointer to the data to hash. |
| len | Number of bytes in buf. |
| crc | Running CRC64 value (initialise with INITIAL_CRC64). |
- Returns
- Updated CRC64 value.