Help with boolean query, 'const char*' to 'const unsigned char*'

Hi,

I'm looking for a little help with boolean and a crc checksum. I think I'm getting slightly turned around on the variable to check with?

This is the code I have so far:

#include <crc16.h>

void setup() {

boolean result = crcverify("AAAAAA", 9);
Serial.println(result);

}

And the Error message:
sketch_jul21b.ino: In function 'void setup()':
sketch_jul21b:6: error: invalid conversion from 'const char*' to 'const unsigned char*'
sketch_jul21b:6: error: initializing argument 1 of 'int crcverify(const unsigned char*, long unsigned int)'

From the error I will say that:

#include <crc16.h>

void setup() {
 
  const unsigned char value[] ="AAAAAA";
  boolean result = crcverify(value, 9);
  Serial.println(result);
 
}

will solve the problem, but I really don't know why it is complaining about that.

Thanks for the help!

but I really don't know why it is complaining about that.

It is complaining because it is an invalid conversion from one type to another type.

A CRC can be calculated on arbitrary binary values - not just ASCII strings - so the definition uses unsigned char*.

Pete

P.S. where is the crcverify function? I can't find it in the crc16 library.

Pete