16 size_t size = node_id != NULL ? strlen(node_id)
20 uint32_t hash =
nyx_hash(size, node_id, 0xAABBCCDD);
24 result_mac[2] = (uint8_t) ((hash >> 24) & 0xFF);
25 result_mac[3] = (uint8_t) ((hash >> 16) & 0xFF);
26 result_mac[4] = (uint8_t) ((hash >> 8) & 0xFF);
27 result_mac[5] = (uint8_t) ((hash >> 0) & 0xFF);
uint32_t nyx_hash(__NYX_ZEROABLE__ size_t size, __NYX_NULLABLE__ BUFF_t buff, uint32_t seed)
Hashes a buffer using the MurmurHash2 algorithm.
void nyx_generate_mac_addr(uint8_t result_mac[6], uint8_t mac0, uint8_t mac1, STR_t node_id)
Generates a MAC address based on a node identifier.