File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1313#include "sha1.h"
1414#include "ubc_check.h"
1515
16+
17+ /*
18+ Because Little-Endian architectures are most common,
19+ we only set BIGENDIAN if one of these conditions is met.
20+ Note that all MSFT platforms are little endian,
21+ so none of these will be defined under the MSC compiler.
22+ If you are compiling on a big endian platform and your compiler does not define one of these,
23+ you will have to add whatever macros your tool chain defines to indicate Big-Endianness.
24+ */
25+ #if (defined(__BYTE_ORDER ) && (__BYTE_ORDER == __BIG_ENDIAN )) || \
26+ (defined(__BYTE_ORDER__ ) && (__BYTE_ORDER__ == __BIG_ENDIAN__ )) || \
27+ defined(__BIG_ENDIAN__ ) || defined(__ARMEB__ ) || defined(__THUMBEB__ ) || defined(__AARCH64EB__ ) || \
28+ defined(_MIPSEB ) || defined(__MIPSEB ) || defined(__MIPSEB__ )
29+
30+ #define BIGENDIAN (1)
31+
32+ #endif /*ENDIANNESS SELECTION*/
33+
1634#define rotate_right (x ,n ) (((x)>>(n))|((x)<<(32-(n))))
1735#define rotate_left (x ,n ) (((x)<<(n))|((x)>>(32-(n))))
1836
You can’t perform that action at this time.
0 commit comments