crypto-algorithms
crypto-algorithms copied to clipboard
Typedefs on Windows
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.
I would also vote for using stdint.h
types over WORD
. I'm having to copy and fix up the code locally.