Loading...
Searching...
No Matches

Implementation of common functionality for SHA-512 hashing function. More...

Detailed Description

Implementation of common functionality for SHA-512 hashing function.

Files

file  sha512_common.h
 Common definitions for the SHA-512 hash function.
 

Data Structures

struct  sha512_common_context_t
 Structure to hold the SHA-512 context. More...
 

Functions

void sha512_common_pad (sha512_common_context_t *ctx)
 SHA-512 initialization.
 
void sha512_common_update (sha512_common_context_t *ctx, const void *data, size_t len)
 Add bytes into the hash.
 
void sha512_common_final (sha512_common_context_t *ctx, void *digest, size_t dig_len)
 SHA-512 finalization.
 

Function Documentation

◆ sha512_common_final()

void sha512_common_final ( sha512_common_context_t ctx,
void *  digest,
size_t  dig_len 
)

SHA-512 finalization.

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

Parameters
ctxsha512_common_context_t handle to use, must not be NULL
[out]digestresulting digest, this is the hash of all the bytes
[in]dig_lenLength of digest

◆ sha512_common_pad()

void sha512_common_pad ( sha512_common_context_t ctx)

SHA-512 initialization.

Begins a SHA-512 operation.

Parameters
ctxsha512_common_context_t handle to init, must not be NULL

◆ sha512_common_update()

void sha512_common_update ( sha512_common_context_t ctx,
const void *  data,
size_t  len 
)

Add bytes into the hash.

Parameters
ctxsha512_common_context_t handle to use, must not be NULL
[in]dataInput data
[in]lenLength of data