diff options
Diffstat (limited to '')
-rw-r--r-- | src/fundamental/sha256-fundamental.c (renamed from src/fundamental/sha256.c) | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/fundamental/sha256.c b/src/fundamental/sha256-fundamental.c index 4389e9e..f8524ba 100644 --- a/src/fundamental/sha256.c +++ b/src/fundamental/sha256-fundamental.c @@ -29,21 +29,14 @@ #endif #include "macro-fundamental.h" -#include "sha256.h" +#include "sha256-fundamental.h" #include "unaligned-fundamental.h" #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ # define SWAP(n) \ - (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24)) + __builtin_bswap32(n) # define SWAP64(n) \ - (((n) << 56) \ - | (((n) & 0xff00) << 40) \ - | (((n) & 0xff0000) << 24) \ - | (((n) & 0xff000000) << 8) \ - | (((n) >> 8) & 0xff000000) \ - | (((n) >> 24) & 0xff0000) \ - | (((n) >> 40) & 0xff00) \ - | ((n) >> 56)) + __builtin_bswap64(n) #else # define SWAP(n) (n) # define SWAP64(n) (n) |