libmoost
/home/mhx/git/github/libmoost/src/digest/rfc6234/sha1.c File Reference
#include "sha.h"
#include "sha-private.h"
Include dependency graph for sha1.c:

Go to the source code of this file.

Defines

#define SHA1_ROTL(bits, word)   (((word) << (bits)) | ((word) >> (32-(bits))))
#define SHA1AddLength(context, length)

Functions

static void SHA1ProcessMessageBlock (SHA1Context *context)
static void SHA1Finalize (SHA1Context *context, uint8_t Pad_Byte)
static void SHA1PadMessage (SHA1Context *context, uint8_t Pad_Byte)
int SHA1Reset (SHA1Context *context)
int SHA1Input (SHA1Context *context, const uint8_t *message_array, unsigned length)
int SHA1FinalBits (SHA1Context *context, uint8_t message_bits, unsigned int length)
int SHA1Result (SHA1Context *context, uint8_t Message_Digest[SHA1HashSize])

Variables

static uint32_t addTemp

Define Documentation

#define SHA1_ROTL (   bits,
  word 
)    (((word) << (bits)) | ((word) >> (32-(bits))))

Definition at line 45 of file sha1.c.

#define SHA1AddLength (   context,
  length 
)
Value:
(addTemp = (context)->Length_Low,                      \
     (context)->Corrupted =                                \
        (((context)->Length_Low += (length)) < addTemp) && \
        (++(context)->Length_High == 0) ? shaInputTooLong  \
                                        : (context)->Corrupted )

Definition at line 53 of file sha1.c.


Function Documentation

int SHA1FinalBits ( SHA1Context context,
uint8_t  message_bits,
unsigned int  length 
)

Definition at line 162 of file sha1.c.

Here is the call graph for this function:

static void SHA1Finalize ( SHA1Context context,
uint8_t  Pad_Byte 
) [static]

Definition at line 343 of file sha1.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int SHA1Input ( SHA1Context context,
const uint8_t *  message_array,
unsigned  length 
)

Definition at line 120 of file sha1.c.

Here is the call graph for this function:

static void SHA1PadMessage ( SHA1Context context,
uint8_t  Pad_Byte 
) [static]

Definition at line 379 of file sha1.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void SHA1ProcessMessageBlock ( SHA1Context context) [static]

Definition at line 250 of file sha1.c.

Here is the caller graph for this function:

int SHA1Reset ( SHA1Context context)

Definition at line 80 of file sha1.c.

int SHA1Result ( SHA1Context context,
uint8_t  Message_Digest[SHA1HashSize] 
)

Definition at line 212 of file sha1.c.

Here is the call graph for this function:


Variable Documentation

uint32_t addTemp [static]

Definition at line 52 of file sha1.c.