Application collects weather data from a BME280 sensor and sends it to IoT hub, also take actions according to cloud-to-device message, device management.
Additional to the buffer start address, also pass the buffer length to get_mac_address_hash() and sha256().
sizeof(buffer) from inside the functions will not give the size of the buffer, but the size of the start address of the buffer (e.g. 4 byte).
Additional to the buffer start address, also pass the buffer length to get_mac_address_hash() and sha256(). sizeof(buffer) from inside the functions will not give the size of the buffer, but the size of the start address of the buffer (e.g. 4 byte).