crypto-algorithms
crypto-algorithms copied to clipboard
Basic implementations of standard cryptography algorithms, like AES and SHA-1.
The read from `data` is promoted to `int`, and so the left shift by 24 in `md5.c` may cause signed overflow. This requires cast to an `unsigned int`: ```diff ---...
I noticed that I can't build sha256.c and sha256.h in Windows, because `WORD` is redefined with different data types. There is no 32-bit `WORD`. A `WORD` is always 16-bit, and...
``` Clang’s UndefinedBehaviorSanitizer reports: runtime error: left shift of 255 by 24 places cannot be represented in type 'int' Because each data byte (0–255) is promoted to a signed int...
https://github.com/B-Con/crypto-algorithms/blob/cfbde48414baacf51fc7c74f275190881f037d32/sha256.h#L6