Implementation of the SHA-224 hashing function. More...

Detailed Description

Implementation of the SHA-224 hashing function.

Files

file  sha224.h
 Header definitions for the SHA224 hash function.
 

Macros

#define SHA224_DIGEST_LENGTH   (28)
 Length of SHA224 digests in bytes.
 
#define SHA224_INTERNAL_BLOCK_SIZE   (64)
 512 Bit (64 Byte) internally used block size for sha224
 

Typedefs

typedef sha2xx_context_t sha224_context_t
 Context for cipher operations based on sha224.
 

Functions

void sha224_init (sha224_context_t *ctx)
 SHA-224 initialization. More...
 
static void sha224_update (sha224_context_t *ctx, const void *data, size_t len)
 Add bytes into the hash. More...
 
static void sha224_final (sha224_context_t *ctx, void *digest)
 SHA-224 finalization. More...
 
void * sha224 (const void *data, size_t len, void *digest)
 A wrapper function to simplify the generation of a hash, this is useful for generating sha224 for one buffer. More...
 

Function Documentation

◆ sha224()

void* sha224 ( const void *  data,
size_t  len,
void *  digest 
)

A wrapper function to simplify the generation of a hash, this is useful for generating sha224 for one buffer.

Parameters
[in]datapointer to the buffer to generate hash from
[in]lenlength of the buffer
[out]digestoptional pointer to an array for the result, length must be SHA224_DIGEST_LENGTH if digest == NULL, one static buffer is used

◆ sha224_final()

static void sha224_final ( sha224_context_t ctx,
void *  digest 
)
inlinestatic

SHA-224 finalization.

Pads the input data, exports the hash value, and clears the context state.

Parameters
ctxsha224_context_t handle to use
digestresulting digest, this is the hash of all the bytes

Definition at line 103 of file sha224.h.

◆ sha224_init()

void sha224_init ( sha224_context_t ctx)

SHA-224 initialization.

Begins a SHA-224 operation.

Parameters
ctxsha224_context_t handle to init

◆ sha224_update()

static void sha224_update ( sha224_context_t ctx,
const void *  data,
size_t  len 
)
inlinestatic

Add bytes into the hash.

Parameters
ctxsha224_context_t handle to use
[in]dataInput data
[in]lenLength of data

Definition at line 91 of file sha224.h.