|
IoT managed integrations End Device SDK
|
Go to the source code of this file.
Functions | |
| iotmiDev_DMStatus | iotmiDev_stringToInt (const char *str, int *value) |
| Converts a string to an integer. | |
| iotmiDev_DMStatus | iotmiDev_stringToUint8 (const char *str, uint8_t *value) |
| Converts a string to an unsigned 8-bit integer. | |
| iotmiDev_DMStatus | iotmiDev_stringToUint16 (const char *str, uint16_t *value) |
| Converts a string to an unsigned 16-bit integer. | |
| iotmiDev_DMStatus | iotmiDev_stringToUint32 (const char *str, uint32_t *value) |
| Converts a string to an unsigned 32-bit integer. | |
| iotmiDev_DMStatus | iotmiDev_stringToUint64 (const char *str, uint64_t *value) |
| Converts a string to an unsigned 64-bit integer. | |
| iotmiDev_DMStatus | iotmiDev_stringToInt32 (const char *str, int32_t *value) |
| Converts a string to a signed 32-bit integer. | |
| iotmiDev_DMStatus | iotmiDev_stringToInt64 (const char *str, int64_t *value) |
| Converts a string to a signed 64-bit integer. | |
| iotmiDev_DMStatus | iotmiDev_base64Encode (const uint8_t *input, size_t input_len, char *output, size_t output_size, size_t *output_len) |
| Encodes binary data to base64 string. | |
| iotmiDev_DMStatus | iotmiDev_truncateForLogging (const char *input, char *output, size_t output_size, size_t prefix_len, size_t suffix_len) |
| Truncates sensitive data for secure logging. | |
This file defines some string utility functions.
| iotmiDev_DMStatus iotmiDev_base64Encode | ( | const uint8_t * | input, |
| size_t | input_len, | ||
| char * | output, | ||
| size_t | output_size, | ||
| size_t * | output_len | ||
| ) |
Encodes binary data to base64 string.
| [in] | input | Binary data to encode. |
| [in] | input_len | Length of input data. |
| [out] | output | Buffer for base64 string. |
| [in] | output_size | Size of output buffer. |
| [out] | output_len | Actual length of encoded string. |
| iotmiDev_DMStatus iotmiDev_stringToInt | ( | const char * | str, |
| int * | value | ||
| ) |
Converts a string to an integer.
| [in] | str | The input string to convert. |
| [out] | value | Pointer to store the converted integer value. |
| iotmiDev_DMStatus iotmiDev_stringToInt32 | ( | const char * | str, |
| int32_t * | value | ||
| ) |
Converts a string to a signed 32-bit integer.
| [in] | str | The input string to convert. |
| [out] | value | Pointer to store the converted int32_t value. |
| iotmiDev_DMStatus iotmiDev_stringToInt64 | ( | const char * | str, |
| int64_t * | value | ||
| ) |
Converts a string to a signed 64-bit integer.
| [in] | str | The input string to convert. |
| [out] | value | Pointer to store the converted int64_t value. |
| iotmiDev_DMStatus iotmiDev_stringToUint16 | ( | const char * | str, |
| uint16_t * | value | ||
| ) |
Converts a string to an unsigned 16-bit integer.
| [in] | str | The input string to convert. |
| [out] | value | Pointer to store the converted uint16_t value. |
| iotmiDev_DMStatus iotmiDev_stringToUint32 | ( | const char * | str, |
| uint32_t * | value | ||
| ) |
Converts a string to an unsigned 32-bit integer.
| [in] | str | The input string to convert. |
| [out] | value | Pointer to store the converted uint32_t value. |
| iotmiDev_DMStatus iotmiDev_stringToUint64 | ( | const char * | str, |
| uint64_t * | value | ||
| ) |
Converts a string to an unsigned 64-bit integer.
| [in] | str | The input string to convert. |
| [out] | value | Pointer to store the converted uint64_t value. |
| iotmiDev_DMStatus iotmiDev_stringToUint8 | ( | const char * | str, |
| uint8_t * | value | ||
| ) |
Converts a string to an unsigned 8-bit integer.
| [in] | str | The input string to convert. |
| [out] | value | Pointer to store the converted uint8_t value. |
| iotmiDev_DMStatus iotmiDev_truncateForLogging | ( | const char * | input, |
| char * | output, | ||
| size_t | output_size, | ||
| size_t | prefix_len, | ||
| size_t | suffix_len | ||
| ) |
Truncates sensitive data for secure logging.
Creates a truncated version of sensitive data showing only the first and last few characters with ellipsis in between (e.g., "1234...5678").
| [in] | input | The sensitive string to truncate. |
| [out] | output | Buffer for truncated string. |
| [in] | output_size | Size of output buffer. |
| [in] | prefix_len | Number of characters to show at start (default: 4). |
| [in] | suffix_len | Number of characters to show at end (default: 4). |