Go to the source code of this file.
|
#define | SHFR(x, n) (x >> n) |
|
#define | ROTR(x, n) ((x >> n) | (x << ((sizeof(x) << 3) - n))) |
|
#define | ROTL(x, n) ((x << n) | (x >> ((sizeof(x) << 3) - n))) |
|
#define | CH(x, y, z) ((x & y) ^ (~x & z)) |
|
#define | MAJ(x, y, z) ((x & y) ^ (x & z) ^ (y & z)) |
|
#define | PACK32(str, x) |
|
#define | UNPACK32(x, str) |
|
#define | PACK64(str, x) |
|
#define | UNPACK64(x, str) |
|
#define | HOST_c2l(c, l) |
|
#define | HOST_l2c(l, c) |
|
#define | SWAP(n) (n) |
|
§ CH
#define CH |
( |
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| ((x & y) ^ (~x & z)) |
§ HOST_c2l
#define HOST_c2l |
( |
|
c, |
|
|
|
l |
|
) |
| |
Value:(\
l =(((
Uint32)(*((c)++)))<<24), \
l|=(((
Uint32)(*((c)++)))<<16), \
l|=(((
Uint32)(*((c)++)))<< 8), \
l)
unsigned long Uint32
Definition: PlatformDefines.hpp:241
§ HOST_l2c
#define HOST_l2c |
( |
|
l, |
|
|
|
c |
|
) |
| |
Value:(\
*((c)++)=(
Uint8)(((l)>>24)&0xff), \
*((c)++)=(
Uint8)(((l)>>16)&0xff), \
*((c)++)=(
Uint8)(((l)>> 8)&0xff), \
*((c)++)=(
Uint8)(((l) )&0xff), \
l)
unsigned char Uint8
Definition: PlatformDefines.hpp:212
§ MAJ
#define MAJ |
( |
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| ((x & y) ^ (x & z) ^ (y & z)) |
§ PACK32
#define PACK32 |
( |
|
str, |
|
|
|
x |
|
) |
| |
Value:{ \
*(x) = ((
Uint32) *((str) + 3)) | \
((
Uint32) *((str) + 2) << 8) | \
((
Uint32) *((str) + 1) << 16) | \
((
Uint32) *((str) + 0) << 24); \
}
unsigned long Uint32
Definition: PlatformDefines.hpp:241
§ PACK64
#define PACK64 |
( |
|
str, |
|
|
|
x |
|
) |
| |
Value:{ \
*(x) = ((
Uint64) *((str) + 7) ) | \
((
Uint64) *((str) + 6) << 8) | \
((
Uint64) *((str) + 5) << 16) | \
((
Uint64) *((str) + 4) << 24) | \
((
Uint64) *((str) + 3) << 32) | \
((
Uint64) *((str) + 2) << 40) | \
((
Uint64) *((str) + 1) << 48) | \
((
Uint64) *((str) + 0) << 56); \
}
unsigned long long Uint64
Definition: PlatformDefines.hpp:252
§ ROTL
#define ROTL |
( |
|
x, |
|
|
|
n |
|
) |
| ((x << n) | (x >> ((sizeof(x) << 3) - n))) |
§ ROTR
#define ROTR |
( |
|
x, |
|
|
|
n |
|
) |
| ((x >> n) | (x << ((sizeof(x) << 3) - n))) |
§ SHFR
#define SHFR |
( |
|
x, |
|
|
|
n |
|
) |
| (x >> n) |
§ SWAP
§ UNPACK32
#define UNPACK32 |
( |
|
x, |
|
|
|
str |
|
) |
| |
Value:{ \
*((str) + 3) = (
Uint8) ((x)); \
*((str) + 2) = (
Uint8) ((x) >> 8); \
*((str) + 1) = (
Uint8) ((x) >> 16); \
*((str) + 0) = (
Uint8) ((x) >> 24); \
}
unsigned char Uint8
Definition: PlatformDefines.hpp:212
§ UNPACK64
#define UNPACK64 |
( |
|
x, |
|
|
|
str |
|
) |
| |
Value:{ \
*((str) + 7) = (
Uint8) ((x)); \
*((str) + 6) = (
Uint8) ((x) >> 8); \
*((str) + 5) = (
Uint8) ((x) >> 16); \
*((str) + 4) = (
Uint8) ((x) >> 24); \
*((str) + 3) = (
Uint8) ((x) >> 32); \
*((str) + 2) = (
Uint8) ((x) >> 40); \
*((str) + 1) = (
Uint8) ((x) >> 48); \
*((str) + 0) = (
Uint8) ((x) >> 56); \
}
unsigned char Uint8
Definition: PlatformDefines.hpp:212
§ ECryptType
this enumeration will select the correct symetric crypt algorithm
Enumerator |
---|
etSimpleDES | |
etXTEA | |