|
Nyx Node
|
Functions | |
| 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. | |
| __NYX_NULLABLE__ str_t | nyx_base64_encode (__NYX_NULLABLE__ size_t *result_len, __NYX_ZEROABLE__ size_t size, __NYX_NULLABLE__ BUFF_t buff) |
| Encodes a buffer using the Base64 algorithm. | |
| __NYX_NULLABLE__ buff_t | nyx_base64_decode (__NYX_NULLABLE__ size_t *result_size, __NYX_ZEROABLE__ size_t len, __NYX_NULLABLE__ STR_t str) |
| Decodes a string using the Base64 algorithm. | |
| __NYX_NULLABLE__ buff_t | nyx_zlib_deflate (__NYX_NULLABLE__ size_t *result_size, __NYX_ZEROABLE__ size_t size, __NYX_NULLABLE__ BUFF_t buff) |
| Compresses a buffer using the ZLib algorithm. | |
| __NYX_NULLABLE__ buff_t | nyx_zlib_inflate (__NYX_NOTNULL__ size_t *result_size, __NYX_ZEROABLE__ size_t size, __NYX_NULLABLE__ BUFF_t buff) |
| Decompresses a buffer using the ZLib algorithm. | |
| __NYX_NULLABLE__ str_t | nyx_zlib_base64_deflate (__NYX_NULLABLE__ size_t *result_len, __NYX_ZEROABLE__ size_t size, __NYX_NULLABLE__ BUFF_t buff) |
| Compresses a buffer using the ZLib+Base64 algorithm. | |
| __NYX_NULLABLE__ buff_t | nyx_zlib_base64_inflate (__NYX_NOTNULL__ size_t *result_size, __NYX_ZEROABLE__ size_t len, __NYX_NULLABLE__ STR_t str) |
| Decompresses a string using the ZLib+Base64 algorithm. | |
Utilities.
| uint32_t nyx_hash | ( | __NYX_ZEROABLE__ size_t | size, |
| __NYX_NULLABLE__ BUFF_t | buff, | ||
| uint32_t | seed | ||
| ) |
Hashes a buffer using the MurmurHash2 algorithm.
| size | Size of the buffer to hash. |
| buff | Pointer to the buffer to hash. |
| seed | Initial seed value. |
| 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.
| result_mac | Output array to store the generated MAC address. |
| mac0 | First fixed byte of the MAC address. |
| mac1 | Second fixed byte of the MAC address. |
| node_id | Unique node identifier used to hash the remaining bytes. |
| __NYX_NULLABLE__ str_t nyx_base64_encode | ( | __NYX_NULLABLE__ size_t * | result_len, |
| __NYX_ZEROABLE__ size_t | size, | ||
| __NYX_NULLABLE__ BUFF_t | buff | ||
| ) |
Encodes a buffer using the Base64 algorithm.
| result_len | Optional pointer to store the length of the encoded string. |
| size | Size of the buffer to encode. |
| buff | Pointer to the buffer to encode. |
| __NYX_NULLABLE__ buff_t nyx_base64_decode | ( | __NYX_NULLABLE__ size_t * | result_size, |
| __NYX_ZEROABLE__ size_t | len, | ||
| __NYX_NULLABLE__ STR_t | str | ||
| ) |
Decodes a string using the Base64 algorithm.
| result_size | Optional pointer to store the size of the decoded buffer. |
| len | Length of the string to decode. |
| str | Pointer to the string to decode. |
| __NYX_NULLABLE__ buff_t nyx_zlib_deflate | ( | __NYX_NULLABLE__ size_t * | result_size, |
| __NYX_ZEROABLE__ size_t | size, | ||
| __NYX_NULLABLE__ BUFF_t | buff | ||
| ) |
Compresses a buffer using the ZLib algorithm.
| result_size | Optional pointer to store the size of the compressed buffer. |
| size | Size of the buffer to compress. |
| buff | Pointer to the buffer to compress. |
| __NYX_NULLABLE__ buff_t nyx_zlib_inflate | ( | __NYX_NOTNULL__ size_t * | result_size, |
| __NYX_ZEROABLE__ size_t | size, | ||
| __NYX_NULLABLE__ BUFF_t | buff | ||
| ) |
Decompresses a buffer using the ZLib algorithm.
| result_size | Mandatory pointer to provide and store the size of the decompressed buffer. |
| size | Size of the buffer to decompress. |
| buff | Pointer to the buffer to decompress. |
| __NYX_NULLABLE__ str_t nyx_zlib_base64_deflate | ( | __NYX_NULLABLE__ size_t * | result_len, |
| __NYX_ZEROABLE__ size_t | size, | ||
| __NYX_NULLABLE__ BUFF_t | buff | ||
| ) |
Compresses a buffer using the ZLib+Base64 algorithm.
| result_len | Optional pointer to store the length of the compressed string. |
| size | Size of the buffer to compress. |
| buff | Pointer to the buffer to compress. |
| __NYX_NULLABLE__ buff_t nyx_zlib_base64_inflate | ( | __NYX_NOTNULL__ size_t * | result_size, |
| __NYX_ZEROABLE__ size_t | len, | ||
| __NYX_NULLABLE__ STR_t | str | ||
| ) |
Decompresses a string using the ZLib+Base64 algorithm.
| result_size | Mandatory pointer to provide and store the size of the decompressed buffer. |
| len | Length of the string to decompress. |
| str | Pointer to the string to decompress. |