sha_locl.h File Reference

#include <stdlib.h>
#include <string.h>

Include dependency graph for sha_locl.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define ULONG   unsigned long
#define UCHAR   unsigned char
#define UINT   unsigned int
#define c2nl(c, l)
#define p_c2nl(c, l, n)
#define c2nl_p(c, l, n)
#define p_c2nl_p(c, l, sc, len)
#define nl2c(l, c)
#define c2l(c, l)
#define p_c2l(c, l, n)
#define c2l_p(c, l, n)
#define p_c2l_p(c, l, sc, len)
#define l2c(l, c)
#define ROTATE(a, n)   (((a)<<(n))|(((a)&0xffffffff)>>(32-(n))))
#define Endian_Reverse32(a)
#define F_00_19(b, c, d)   ((((c) ^ (d)) & (b)) ^ (d))
#define F_20_39(b, c, d)   ((b) ^ (c) ^ (d))
#define F_40_59(b, c, d)   (((b) & (c)) | (((b)|(c)) & (d)))
#define F_60_79(b, c, d)   F_20_39(b,c,d)
#define BODY_00_15(i, a, b, c, d, e, f, xa)
#define BODY_16_19(i, a, b, c, d, e, f, xa, xb, xc, xd)
#define BODY_20_31(i, a, b, c, d, e, f, xa, xb, xc, xd)
#define BODY_32_39(i, a, b, c, d, e, f, xa)
#define BODY_40_59(i, a, b, c, d, e, f, xa)
#define BODY_60_79(i, a, b, c, d, e, f, xa)


Define Documentation

#define BODY_00_15 i,
a,
b,
c,
d,
e,
f,
xa   ) 
 

Value:

(f)=xa[i]+(e)+K_00_19+ROTATE((a),5)+F_00_19((b),(c),(d)); \
    (b)=ROTATE((b),30);

Definition at line 221 of file sha_locl.h.

Referenced by sha1_block().

#define BODY_16_19 i,
a,
b,
c,
d,
e,
f,
xa,
xb,
xc,
xd   ) 
 

Value:

Xupdate(f,i,xa,xb,xc,xd); \
    (f)+=(e)+K_00_19+ROTATE((a),5)+F_00_19((b),(c),(d)); \
    (b)=ROTATE((b),30);

Definition at line 225 of file sha_locl.h.

Referenced by sha1_block().

#define BODY_20_31 i,
a,
b,
c,
d,
e,
f,
xa,
xb,
xc,
xd   ) 
 

Value:

Xupdate(f,i,xa,xb,xc,xd); \
    (f)+=(e)+K_20_39+ROTATE((a),5)+F_20_39((b),(c),(d)); \
    (b)=ROTATE((b),30);

Definition at line 230 of file sha_locl.h.

Referenced by sha1_block().

#define BODY_32_39 i,
a,
b,
c,
d,
e,
f,
xa   ) 
 

Value:

Xupdate(f,i,xa,xa,xa,xa); \
    (f)+=(e)+K_20_39+ROTATE((a),5)+F_20_39((b),(c),(d)); \
    (b)=ROTATE((b),30);

Definition at line 235 of file sha_locl.h.

Referenced by sha1_block().

#define BODY_40_59 i,
a,
b,
c,
d,
e,
f,
xa   ) 
 

Value:

Xupdate(f,i,xa,xa,xa,xa); \
    (f)+=(e)+K_40_59+ROTATE((a),5)+F_40_59((b),(c),(d)); \
    (b)=ROTATE((b),30);

Definition at line 240 of file sha_locl.h.

Referenced by sha1_block().

#define BODY_60_79 i,
a,
b,
c,
d,
e,
f,
xa   ) 
 

Value:

Xupdate(f,i,xa,xa,xa,xa); \
    (f)=X[(i)&0x0f]+(e)+K_60_79+ROTATE((a),5)+F_60_79((b),(c),(d)); \
    (b)=ROTATE((b),30);

Definition at line 245 of file sha_locl.h.

Referenced by sha1_block().

#define c2l c,
 ) 
 

Value:

(l =(((unsigned long)(*((c)++)))    ), \
             l|=(((unsigned long)(*((c)++)))<< 8), \
             l|=(((unsigned long)(*((c)++)))<<16), \
             l|=(((unsigned long)(*((c)++)))<<24))

Definition at line 124 of file sha_locl.h.

#define c2l_p c,
l,
 ) 
 

Value:

{ \
            l=0; \
            (c)+=n; \
            switch (n) { \
            case 3: l =((unsigned long)(*(--(c))))<<16; \
            case 2: l|=((unsigned long)(*(--(c))))<< 8; \
            case 1: l|=((unsigned long)(*(--(c)))); \
                } \
            }

Definition at line 141 of file sha_locl.h.

#define c2nl c,
 ) 
 

Value:

(l =(((unsigned long)(*((c)++)))<<24), \
             l|=(((unsigned long)(*((c)++)))<<16), \
             l|=(((unsigned long)(*((c)++)))<< 8), \
             l|=(((unsigned long)(*((c)++)))    ))

Definition at line 78 of file sha_locl.h.

#define c2nl_p c,
l,
 ) 
 

Value:

{ \
            l=0; \
            (c)+=n; \
            switch (n) { \
            case 3: l =((unsigned long)(*(--(c))))<< 8; \
            case 2: l|=((unsigned long)(*(--(c))))<<16; \
            case 1: l|=((unsigned long)(*(--(c))))<<24; \
                } \
            }

Definition at line 95 of file sha_locl.h.

#define Endian_Reverse32  ) 
 

Value:

{ \
    unsigned long l=(a); \
    l=(((l&0xFF00FF00)>>8L)|((l&0x00FF00FF)<<8L)); \
    (a)=ROTATE(l,16L); \
    }

Definition at line 189 of file sha_locl.h.

Referenced by SHA1_Final(), and SHA1_Transform().

#define F_00_19 b,
c,
 )     ((((c) ^ (d)) & (b)) ^ (d))
 

Definition at line 204 of file sha_locl.h.

#define F_20_39 b,
c,
 )     ((b) ^ (c) ^ (d))
 

Definition at line 205 of file sha_locl.h.

#define F_40_59 b,
c,
 )     (((b) & (c)) | (((b)|(c)) & (d)))
 

Definition at line 206 of file sha_locl.h.

#define F_60_79 b,
c,
 )     F_20_39(b,c,d)
 

Definition at line 207 of file sha_locl.h.

#define l2c l,
 ) 
 

Value:

(*((c)++)=(unsigned char)(((l)    )&0xff), \
             *((c)++)=(unsigned char)(((l)>> 8)&0xff), \
             *((c)++)=(unsigned char)(((l)>>16)&0xff), \
             *((c)++)=(unsigned char)(((l)>>24)&0xff))

Definition at line 164 of file sha_locl.h.

#define nl2c l,
 ) 
 

Value:

(*((c)++)=(unsigned char)(((l)>>24)&0xff), \
             *((c)++)=(unsigned char)(((l)>>16)&0xff), \
             *((c)++)=(unsigned char)(((l)>> 8)&0xff), \
             *((c)++)=(unsigned char)(((l)    )&0xff))

Definition at line 118 of file sha_locl.h.

Referenced by SHA1_Final().

#define p_c2l c,
l,
 ) 
 

Value:

{ \
            switch (n) { \
            case 0: l =((unsigned long)(*((c)++))); \
            case 1: l|=((unsigned long)(*((c)++)))<< 8; \
            case 2: l|=((unsigned long)(*((c)++)))<<16; \
            case 3: l|=((unsigned long)(*((c)++)))<<24; \
                } \
            }

Definition at line 130 of file sha_locl.h.

#define p_c2l_p c,
l,
sc,
len   ) 
 

Value:

{ \
            switch (sc) \
                { \
            case 0: l =((unsigned long)(*((c)++))); \
                if (--len == 0) break; \
            case 1: l|=((unsigned long)(*((c)++)))<< 8; \
                if (--len == 0) break; \
            case 2: l|=((unsigned long)(*((c)++)))<<16; \
                } \
            }

Definition at line 152 of file sha_locl.h.

#define p_c2nl c,
l,
 ) 
 

Value:

{ \
            switch (n) { \
            case 0: l =((unsigned long)(*((c)++)))<<24; \
            case 1: l|=((unsigned long)(*((c)++)))<<16; \
            case 2: l|=((unsigned long)(*((c)++)))<< 8; \
            case 3: l|=((unsigned long)(*((c)++))); \
                } \
            }

Definition at line 84 of file sha_locl.h.

#define p_c2nl_p c,
l,
sc,
len   ) 
 

Value:

{ \
            switch (sc) \
                { \
            case 0: l =((unsigned long)(*((c)++)))<<24; \
                if (--len == 0) break; \
            case 1: l|=((unsigned long)(*((c)++)))<<16; \
                if (--len == 0) break; \
            case 2: l|=((unsigned long)(*((c)++)))<< 8; \
                } \
            }

Definition at line 106 of file sha_locl.h.

#define ROTATE a,
 )     (((a)<<(n))|(((a)&0xffffffff)>>(32-(n))))
 

Definition at line 177 of file sha_locl.h.

#define UCHAR   unsigned char
 

Definition at line 70 of file sha_locl.h.

#define UINT   unsigned int
 

Definition at line 71 of file sha_locl.h.

Referenced by getscrap(), getscraptype(), handlepopup(), putscrap(), and shelleventloop().

#define ULONG   unsigned long
 

Definition at line 69 of file sha_locl.h.

Referenced by SHA1_Update().


Generated on Sat Jun 10 06:18:49 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6