You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Arduino with ATMEGA 328 and the IDE is version 16.7 installed on Windows 10.
tried to run the example in the documentation. Just to create a HMAC256. I tried to verify the code in the IDE, I get this error which I do not know how to fix. Can you help.
invalid conversion from 'const char_' to 'const uint8_t_ {aka const unsigned char*}' [-fpermissive]
The Code is:
include "sha256.h"
void setup() {
// put your setup code here, to run once:
uint8_t *hash;
//static const char hash[450]={};
//const char *hash; hash={};
Sha256.initHmac("hash key",8); // key, and length of key in bytes
Sha256.print("This is a message to hash");
hash = Sha256.resultHmac();
//Serial.print(hash,HEX);
}
void loop() {
// put your main code here, to run repeatedly:
}
The text was updated successfully, but these errors were encountered:
Maybe late but here is the list of changes to avoid the "invalid conversion" error (you can modify the sha256 files if you just use this sha type): 0ee3a5b
I am using Arduino with ATMEGA 328 and the IDE is version 16.7 installed on Windows 10.
tried to run the example in the documentation. Just to create a HMAC256. I tried to verify the code in the IDE, I get this error which I do not know how to fix. Can you help.
invalid conversion from 'const char_' to 'const uint8_t_ {aka const unsigned char*}' [-fpermissive]
The Code is:
include "sha256.h"
void setup() {
// put your setup code here, to run once:
uint8_t *hash;
//static const char hash[450]={};
//const char *hash; hash={};
Sha256.initHmac("hash key",8); // key, and length of key in bytes
Sha256.print("This is a message to hash");
hash = Sha256.resultHmac();
//Serial.print(hash,HEX);
}
void loop() {
// put your main code here, to run repeatedly:
}
The text was updated successfully, but these errors were encountered: