GNU libmicrohttpd  0.9.62
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
sha256.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sha256_ctx
 

Macros

#define SHA256_DIGEST_SIZE   32
 
#define SHA256_BLOCK_SIZE   64
 
#define _SHA256_DIGEST_LENGTH   8
 

Functions

void sha256_init (void *ctx_)
 
void sha256_update (void *ctx_, const uint8_t *data, size_t length)
 
void sha256_digest (void *ctx_, uint8_t digest[SHA256_DIGEST_SIZE])
 

Macro Definition Documentation

#define _SHA256_DIGEST_LENGTH   8

Definition at line 43 of file sha256.h.

Referenced by sha256_init().

#define SHA256_BLOCK_SIZE   64

Definition at line 40 of file sha256.h.

Referenced by sha256_write_digest().

#define SHA256_DIGEST_SIZE   32

Definition at line 39 of file sha256.h.

Referenced by sha256_digest(), and sha256_write_digest().

Function Documentation

void sha256_digest ( void *  ctx_,
uint8_t  digest[SHA256_DIGEST_SIZE] 
)

Complete SHA256 calculation.

Parameters
ctx_must be a struct sha256_ctx *
digest[out]set to the hash, must be SHA256_DIGEST_SIZE bytes
void sha256_init ( void *  ctx_)

Start SHA256 calculation.

Parameters
ctx_must be a struct sha256_ctx *

Definition at line 238 of file sha256.c.

References _SHA256_DIGEST_LENGTH, sha256_ctx::count, sha256_ctx::index, and sha256_ctx::state.

Referenced by sha256_digest().

Here is the caller graph for this function:

void sha256_update ( void *  ctx_,
const uint8_t *  data,
size_t  length 
)

Update hash calculation.

Parameters
ctx_must be a struct sha256_ctx *
lengthnumber of bytes in data
databytes to add to hash

Definition at line 326 of file sha256.c.

References COMPRESS, sha256_ctx::count, and MD_UPDATE.