crypto-algorithms
crypto-algorithms copied to clipboard
sha256: Use standard types uint8_t / uint32_t so types doesn't have to be adjusted manually
This makes the code more portable. you can use the same code both on a pc and on a embedded system.
if you do not like to use uint8_t and uint32_t for some reason then I would suggest that we use preprocessor to select proper types. Something like:
#if sizeof(int) == 4
typedef unsigned int WORD;
elif sizeof(long) == 4
typedef unsigned long WORD;
#else
#error WORD type not configured properly
#endif