Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid conversion #15

Open
itroublee opened this issue Jan 16, 2016 · 1 comment
Open

invalid conversion #15

itroublee opened this issue Jan 16, 2016 · 1 comment

Comments

@itroublee
Copy link

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:

}

@samyxdev
Copy link

samyxdev commented Jul 22, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants