diff options
Diffstat (limited to 'node/SHA512.cpp')
| -rw-r--r-- | node/SHA512.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/node/SHA512.cpp b/node/SHA512.cpp index b9700109..9d6fbd95 100644 --- a/node/SHA512.cpp +++ b/node/SHA512.cpp @@ -30,6 +30,7 @@ #include <string.h> #include "SHA512.hpp" +#include "Utils.hpp" namespace ZeroTier { @@ -47,6 +48,10 @@ Public domain. #define uint64 uint64_t +#define load_bigendian(x) Utils::ntoh(*((const uint64_t *)(x))) +#define store_bigendian(x,u) (*((uint64_t *)(x)) = Utils::hton((u))) + +#if 0 static uint64 load_bigendian(const unsigned char *x) { return @@ -72,6 +77,7 @@ static void store_bigendian(unsigned char *x,uint64 u) x[1] = u; u >>= 8; x[0] = u; } +#endif #define SHR(x,c) ((x) >> (c)) #define ROTR(x,c) (((x) >> (c)) | ((x) << (64 - (c)))) |
