X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=crc%2Fsha256.c;h=0091d4477284dca5deca9c3e603c4e292ddac2b2;hp=fe08ab3a0e0554ed417e6b7c11dedadffd20677b;hb=00fb3c8dcbb940338fea9f6cab689b4924266305;hpb=5921e80c5dfc9f96d2f21da6ae58f2b5d3a0b373 diff --git a/crc/sha256.c b/crc/sha256.c index fe08ab3a..0091d447 100644 --- a/crc/sha256.c +++ b/crc/sha256.c @@ -19,24 +19,9 @@ #include #include +#include "../lib/bswap.h" #include "sha256.h" -#if __BYTE_ORDER == __LITTLE_ENDIAN -static int __be32_to_cpu(uint32_t val) -{ - uint32_t c1, c2, c3, c4; - - c1 = (val >> 24) & 0xff; - c2 = (val >> 16) & 0xff; - c3 = (val >> 8) & 0xff; - c4 = val & 0xff; - - return c1 | c2 << 8 | c3 << 16 | c4 << 24; -} -#else -#define __be32_to_cpu(x) (x) -#endif - #define SHA256_DIGEST_SIZE 32 #define SHA256_HMAC_BLOCK_SIZE 64