 #include <mcp_can.h>
 #include <SPI.h>
 #include <SpritzCipher.h>
+#include <Time.h>
+
 #include "can_constants.h"
 
 // the cs pin of the version after v1.1 is default to D9

const uint8_t HASH_LEN = 20; // 160-bit. The other 32 bits for timestamp
uint8_t correct_hash[HASH_LEN];
uint8_t hash[HASH_LEN]; // for the incoming hash?

MCP_CAN CAN(SPI_CS_PIN);                                    // Set CS pin


    for (int i = 8; i < 16; i++) msg2[i - 8] = correct_hash[i];
    for (int i = 16; i < 20; i++) msg3[i - 16] = correct_hash[i];

    // Fill last 4 bytes of msg3 with the timestamp
    StampTime(&msg3[4]);

    CAN.sendMsgBuf(id, 0, 8, msg1);
    CAN.sendMsgBuf(id, 0, 8, msg2);
    CAN.sendMsgBuf(id, 0, 8, msg3);
