Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs
sha_fast.h File Reference
#include "prlong.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  SHA1ContextStr
union  SHA1ContextStr.u


#define SHA1_INPUT_LEN   64
#define SHA_ROTL(X, n)   (tmp = (X), ((tmp) << (n)) | ((tmp) >> (32-(n))))
#define SHA_MASK   0x00FF00FF
#define SHA_HTONL(x)   (x)
#define SHA_BYTESWAP(x)   x = SHA_HTONL(x)
#define SHA_STORE(n)   ((PRUint32*)hashout)[n] = SHA_HTONL(ctx->H[n])


typedef PRUint32 SHA_HW_t

Class Documentation

struct SHA1ContextStr

Definition at line 51 of file sha_fast.h.

Collaboration diagram for SHA1ContextStr:
Class Members
PRUint64 size
union SHA1ContextStr u
union SHA1ContextStr u
union SHA1ContextStr.u

Definition at line 52 of file sha_fast.h.

Class Members
PRUint8 b
PRUint32 w

Define Documentation

Definition at line 42 of file sha_fast.h.

#define SHA_BYTESWAP (   x)    x = SHA_HTONL(x)

Definition at line 137 of file sha_fast.h.

#define SHA_HTONL (   x)    (x)

Definition at line 133 of file sha_fast.h.

#define SHA_MASK   0x00FF00FF

Definition at line 126 of file sha_fast.h.

Definition at line 117 of file sha_fast.h.

#define SHA_ROTL (   X,
)    (tmp = (X), ((tmp) << (n)) | ((tmp) >> (32-(n))))

Definition at line 118 of file sha_fast.h.

#define SHA_STORE (   n)    ((PRUint32*)hashout)[n] = SHA_HTONL(ctx->H[n])

Definition at line 139 of file sha_fast.h.

if (!((ptrdiff_t)hashout % sizeof(PRUint32))) { \
    SHA_STORE(0); \
    SHA_STORE(1); \
    SHA_STORE(2); \
    SHA_STORE(3); \
    SHA_STORE(4); \
  } else { \
    memcpy(hashout, ctx->H, SHA1_LENGTH); \

Definition at line 166 of file sha_fast.h.

Typedef Documentation

typedef PRUint32 SHA_HW_t

Definition at line 48 of file sha_fast.h.