| /* ------------------------------------------------------------------------- */ |
/* ------------------------------------------------------------------------- */ |
| /* Data Types used in coding */ |
/* Data Types used in coding */ |
| /* ------------------------------------------------------------------------- */ |
/* ------------------------------------------------------------------------- */ |
| typedef unsigned long long ull; |
typedef u64 ull; |
| typedef u32 ul; |
typedef u32 ul; |
| typedef u8 uc; |
typedef u8 uc; |
| |
|
| |
#if defined(ECRYPT_LITTLE_ENDIAN) |
| typedef union |
typedef union |
| { struct _b |
{ struct _b |
| { uc b0, b1, b2, b3, b4, b5, b6, b7; |
{ uc b0, b1, b2, b3, b4, b5, b6, b7; |
| } w; /* 32-bit access */ |
} w; /* 32-bit access */ |
| ull v; /* 64-bit access */ |
ull v; /* 64-bit access */ |
| } Int; |
} Int; |
| |
#elif defined(ECRYPT_BIG_ENDIAN) |
| |
typedef union |
| |
{ struct _b |
| |
{ uc b7, b6, b5, b4, b3, b2, b1, b0; |
| |
} b; /* 8 -bit access */ |
| |
struct _w |
| |
{ ul w1, w0; |
| |
} w; /* 32-bit access */ |
| |
ull v; /* 64-bit access */ |
| |
} Int; |
| |
#else |
| |
#error Could not detect endianness |
| |
#endif |
| |
|
| /* ------------------------------------------------------------------------- */ |
/* ------------------------------------------------------------------------- */ |
| /* Data structures */ |
/* Data structures */ |