#include <string.h>
#include <inttypes.h>
-#include <byteswap.h>
-#include <endian.h>
+#include "../lib/bswap.h"
#include "sha512.h"
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define __be64_to_cpu(x) __bswap_64(x)
-#else
-#define __be64_to_cpu(x) (x)
-#endif
-
#define SHA384_DIGEST_SIZE 48
#define SHA512_DIGEST_SIZE 64
#define SHA384_HMAC_BLOCK_SIZE 128