 }
 
 
-uint8_t *HexToUInt8(char *hexStr, int &len)
+uint8_t *HexToUInt8(char *hexStr, uint8_t &len)
 {
     len = strlen(hexStr);
     uint8_t *buf = new uint8_t[len];

#include <MD5.h>


char *key = "sharedkey";
int keyLen;
int32_t id = 0xa0;
int8_t dlc = 2;
char *data = "a1f2";
int dataLen;

void setup()
{
    Serial.begin(115200);
    uint8_t *newKey = CStringToUInt8(key, keyLen);
    uint8_t *newMessage = HexToUInt8(data, dataLen);

    SendAuthMessages();
}

void loop()
{
    
}


void SendAuthMessages()
{
    // Convert to uint8_t
    uint8_t *theKey = CStringToUInt8(key, keyLen);
    uint8_t *theMessage = HexToUInt8(data, dataLen);

    // Concatenate into one full message
    uint8_t *fullMessage = new uint8_t[keyLen + dataLen + 1];

}


uint8_t *CStringToUInt8(char *str, uint8_t &len)
{
    len = strlen(str);
    uint8_t *buf = new uint8_t[len];
