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

first '0' gets omitted from hash value #3

Open
Hasi123 opened this issue May 23, 2020 · 0 comments
Open

first '0' gets omitted from hash value #3

Hasi123 opened this issue May 23, 2020 · 0 comments

Comments

@Hasi123
Copy link

Hasi123 commented May 23, 2020

I am trying to use the hmac sha256 in an Arduino project, but I have an issue, where if there are zeros in the hash value, the first zero gets omitted, resulting in a hash length of only 63 bytes. Otherwise the values correspond with online calculators. Has anyone encountered this issue? Any solutions?

Not sure if this makes a difference, but I am including the header with
extern "C"{ #include "hmac-sha256.h" };
because I am compiling with the Arduino IDE (C++).

edit. so for example if I try to hash "hello" with the key "key" I get
937B3B915EFB5171FF14D8CB55FBCC798C6C0EF1456D66DED1A6AA723A58B7B
instead of
9307b3b915efb5171ff14d8cb55fbcc798c6c0ef1456d66ded1a6aa723a58b7b

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

1 participant