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

Typedefs on Windows #13

Open
looki opened this issue Feb 17, 2017 · 1 comment
Open

Typedefs on Windows #13

looki opened this issue Feb 17, 2017 · 1 comment

Comments

@looki
Copy link

looki commented Feb 17, 2017

The BYTE and WORD typedefs defined in sha1.h are suboptimal for use in Windows code - Windows resolves WORD to unsigned shorts, which is incompatible with the 32-bit integer that you use (Also, even the identical BYTE typedef will redefine and cause an error). Took me a moment to figure out why the hashes were mostly zero! I suggest using prefixed typedefs or simply stdint.h.

@petmac
Copy link

petmac commented Feb 20, 2018

I would also vote for using stdint.h types over WORD. I'm having to copy and fix up the code locally.

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