|
CX Framework
Cross-platform C utility framework
|
Data Structures | |
| struct | HostID |
| Host identification information. More... | |
Typedefs | |
| typedef struct HostID | HostID |
| Host identification information. | |
Functions | |
| CX_C void | hostId (HostID *id) |
Provides a stable, privacy-preserving host identifier that remains consistent across application runs on the same machine. The ID is generated by hashing platform-specific system identifiers (such as machine IDs, BIOS UUIDs, or configuration files) to create a 256-bit unique identifier.
The host ID is computed once per application run and cached. The implementation attempts multiple platform-specific identification methods in order of reliability:
The hashing approach ensures end-user privacy while maintaining stability.
Example:
| CX_C void hostId | ( | HostID * | id | ) |
void hostId(HostID *id)
Retrieves the stable host identifier for the current machine.
This function computes the host ID once on first call and caches it for subsequent calls. The identifier is stable across application runs on the same host but may change if underlying system identifiers change (e.g., hardware replacement, OS reinstall).
| id | Output parameter that receives the host identification |