Defines

SimpleDES.cpp File Reference

#include <zeusbase/Security/SimpleDES.h>

Defines

#define BitSet(x, y)   ( ((y) >> (x)) & 0x1)
#define p10(x)
#define p8(x)
#define p4(x)
#define ip(x)
#define ipInv(x)
#define ep(x)
#define RIGHT_5BIT(x)   (x & 0x1F)
#define LEFT_5BIT(x)   ((x >> 5) & 0x1F)
#define RIGHT_4BIT(x)   (x & 0x0F)
#define LEFT_4BIT(x)   ((x >> 4) & 0x0F)
#define ROTLEFT_5(x, y)   (((x << y) | (x >> (5-y))) & 0x1F)
#define SWAP_4BITS(x)   (((x << 4) & 0xF0) | ((x >> 4) & 0x0F))

Define Documentation

#define BitSet (   x,
 
)    ( ((y) >> (x)) & 0x1)
#define ep (   x )
Value:
( (BitSet(0,x) << 7) | \
                 (BitSet(3,x) << 6) | \
                 (BitSet(2,x) << 5) | \
                 (BitSet(1,x) << 4) | \
                 (BitSet(2,x) << 3) | \
                 (BitSet(1,x) << 2) | \
                 (BitSet(0,x) << 1) | \
                  BitSet(3,x) )
#define ip (   x )
Value:
( (BitSet(6,x) << 7) | \
                 (BitSet(2,x) << 6) | \
                 (BitSet(5,x) << 5) | \
                 (BitSet(7,x) << 4) | \
                 (BitSet(4,x) << 3) | \
                 (BitSet(0,x) << 2) | \
                 (BitSet(3,x) << 1) | \
                  BitSet(1,x) )
#define ipInv (   x )
Value:
((BitSet(4,x) << 7) | \
                 (BitSet(7,x) << 6) | \
                 (BitSet(5,x) << 5) | \
                 (BitSet(3,x) << 4) | \
                 (BitSet(1,x) << 3) | \
                 (BitSet(6,x) << 2) | \
                 (BitSet(0,x) << 1) | \
                  BitSet(2,x) )
#define LEFT_4BIT (   x )    ((x >> 4) & 0x0F)
#define LEFT_5BIT (   x )    ((x >> 5) & 0x1F)
#define p10 (   x )
Value:
( (BitSet(7,x) << 9) | \
                 (BitSet(5,x) << 8) | \
                 (BitSet(8,x) << 7) | \
                 (BitSet(3,x) << 6) | \
                 (BitSet(6,x) << 5) | \
                 (BitSet(0,x) << 4) | \
                 (BitSet(9,x) << 3) | \
                 (BitSet(1,x) << 2) | \
                 (BitSet(2,x) << 1) | \
                  BitSet(4,x) )
#define p4 (   x )
Value:
( (BitSet(2,x) << 3) | \
                 (BitSet(0,x) << 2) | \
                 (BitSet(1,x) << 1) | \
                  BitSet(3,x) )
#define p8 (   x )
Value:
( (BitSet(4,x) << 7) | \
                 (BitSet(7,x) << 6) | \
                 (BitSet(3,x) << 5) | \
                 (BitSet(6,x) << 4) | \
                 (BitSet(2,x) << 3) | \
                 (BitSet(5,x) << 2) | \
                 (BitSet(0,x) << 1) | \
                  BitSet(1,x) )
#define RIGHT_4BIT (   x )    (x & 0x0F)
#define RIGHT_5BIT (   x )    (x & 0x1F)
#define ROTLEFT_5 (   x,
 
)    (((x << y) | (x >> (5-y))) & 0x1F)
#define SWAP_4BITS (   x )    (((x << 4) & 0xF0) | ((x >> 4) & 0x0F))
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Sun Jan 22 2012 15:28:21