sha2.h File Reference

#include <inttypes.h>

Go to the source code of this file.

Classes

struct  _SHA256_CTX
struct  _SHA512_CTX

Defines

#define SHA256_BLOCK_LENGTH   64
#define SHA256_DIGEST_LENGTH   32
#define SHA256_DIGEST_STRING_LENGTH   (SHA256_DIGEST_LENGTH * 2 + 1)
#define SHA384_BLOCK_LENGTH   128
#define SHA384_DIGEST_LENGTH   48
#define SHA384_DIGEST_STRING_LENGTH   (SHA384_DIGEST_LENGTH * 2 + 1)
#define SHA512_BLOCK_LENGTH   128
#define SHA512_DIGEST_LENGTH   64
#define SHA512_DIGEST_STRING_LENGTH   (SHA512_DIGEST_LENGTH * 2 + 1)

Typedefs

typedef struct _SHA256_CTX SHA256_CTX
typedef struct _SHA512_CTX SHA512_CTX
typedef SHA512_CTX SHA384_CTX

Functions

void sat_SHA256_Init (SHA256_CTX *)
void sat_SHA256_Update (SHA256_CTX *, const uint8_t *, size_t)
void sat_SHA256_Final (uint8_t[SHA256_DIGEST_LENGTH], SHA256_CTX *)
char * sat_SHA256_End (SHA256_CTX *, char[SHA256_DIGEST_STRING_LENGTH])
char * sat_SHA256_Data (const uint8_t *, size_t, char[SHA256_DIGEST_STRING_LENGTH])
void sat_SHA384_Init (SHA384_CTX *)
void sat_SHA384_Update (SHA384_CTX *, const uint8_t *, size_t)
void sat_SHA384_Final (uint8_t[SHA384_DIGEST_LENGTH], SHA384_CTX *)
char * sat_SHA384_End (SHA384_CTX *, char[SHA384_DIGEST_STRING_LENGTH])
char * sat_SHA384_Data (const uint8_t *, size_t, char[SHA384_DIGEST_STRING_LENGTH])
void sat_SHA512_Init (SHA512_CTX *)
void sat_SHA512_Update (SHA512_CTX *, const uint8_t *, size_t)
void sat_SHA512_Final (uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX *)
char * sat_SHA512_End (SHA512_CTX *, char[SHA512_DIGEST_STRING_LENGTH])
char * sat_SHA512_Data (const uint8_t *, size_t, char[SHA512_DIGEST_STRING_LENGTH])


Define Documentation

#define SHA256_BLOCK_LENGTH   64

Definition at line 39 of file sha2.h.

Referenced by sat_SHA256_Final(), sat_SHA256_Init(), and sat_SHA256_Update().

#define SHA256_DIGEST_LENGTH   32

Definition at line 40 of file sha2.h.

Referenced by sat_SHA256_End(), sat_SHA256_Final(), and sat_SHA256_Init().

#define SHA256_DIGEST_STRING_LENGTH   (SHA256_DIGEST_LENGTH * 2 + 1)

Definition at line 41 of file sha2.h.

#define SHA384_BLOCK_LENGTH   128

Definition at line 42 of file sha2.h.

Referenced by sat_SHA384_Init().

#define SHA384_DIGEST_LENGTH   48

Definition at line 43 of file sha2.h.

Referenced by sat_SHA384_End(), and sat_SHA384_Final().

#define SHA384_DIGEST_STRING_LENGTH   (SHA384_DIGEST_LENGTH * 2 + 1)

Definition at line 44 of file sha2.h.

#define SHA512_BLOCK_LENGTH   128

Definition at line 45 of file sha2.h.

Referenced by sat_SHA512_Init(), sat_SHA512_Update(), and SHA512_Last().

#define SHA512_DIGEST_LENGTH   64

Definition at line 46 of file sha2.h.

Referenced by sat_SHA384_Init(), sat_SHA512_End(), sat_SHA512_Final(), and sat_SHA512_Init().

#define SHA512_DIGEST_STRING_LENGTH   (SHA512_DIGEST_LENGTH * 2 + 1)

Definition at line 47 of file sha2.h.


Typedef Documentation

typedef struct _SHA256_CTX SHA256_CTX

typedef struct _SHA512_CTX SHA512_CTX

Definition at line 66 of file sha2.h.


Function Documentation

void sat_SHA256_Init ( SHA256_CTX  ) 

void sat_SHA256_Update ( SHA256_CTX ,
const uint8_t *  ,
size_t   
)

void sat_SHA256_Final ( uint8_t  [SHA256_DIGEST_LENGTH],
SHA256_CTX  
)

char* sat_SHA256_End ( SHA256_CTX ,
char  [SHA256_DIGEST_STRING_LENGTH] 
)

char* sat_SHA256_Data ( const uint8_t *  ,
size_t  ,
char  [SHA256_DIGEST_STRING_LENGTH] 
)

Definition at line 655 of file sha2.c.

References sat_SHA256_End(), sat_SHA256_Init(), and sat_SHA256_Update().

void sat_SHA384_Init ( SHA384_CTX  ) 

void sat_SHA384_Update ( SHA384_CTX ,
const uint8_t *  ,
size_t   
)

Definition at line 1003 of file sha2.c.

References sat_SHA512_Update().

Referenced by sat_SHA384_Data().

void sat_SHA384_Final ( uint8_t  [SHA384_DIGEST_LENGTH],
SHA384_CTX  
)

char* sat_SHA384_End ( SHA384_CTX ,
char  [SHA384_DIGEST_STRING_LENGTH] 
)

char* sat_SHA384_Data ( const uint8_t *  ,
size_t  ,
char  [SHA384_DIGEST_STRING_LENGTH] 
)

Definition at line 1059 of file sha2.c.

References sat_SHA384_End(), sat_SHA384_Init(), and sat_SHA384_Update().

void sat_SHA512_Init ( SHA512_CTX  ) 

void sat_SHA512_Update ( SHA512_CTX ,
const uint8_t *  ,
size_t   
)

void sat_SHA512_Final ( uint8_t  [SHA512_DIGEST_LENGTH],
SHA512_CTX  
)

char* sat_SHA512_End ( SHA512_CTX ,
char  [SHA512_DIGEST_STRING_LENGTH] 
)

char* sat_SHA512_Data ( const uint8_t *  ,
size_t  ,
char  [SHA512_DIGEST_STRING_LENGTH] 
)

Definition at line 984 of file sha2.c.

References sat_SHA512_End(), sat_SHA512_Init(), and sat_SHA512_Update().


doxygen