libusual  0.1
Data Structures | Defines | Functions
usual/crypto/sha512.h File Reference

SHA512 and SHA384 cryptographic hashes. More...

Data Structures

struct  sha512_ctx
 State structure for both SHA512 and SHA384. More...

Defines

#define SHA384_BLOCK_SIZE
 SHA384 block size in bytes.
#define SHA512_BLOCK_SIZE
 SHA512 block size in bytes.
#define SHA384_DIGEST_LENGTH
 SHA384 result length in bytes.
#define SHA512_DIGEST_LENGTH
 SHA512 result length in bytes.

Functions

void sha512_reset (struct sha512_ctx *ctx)
 Initialize structure for SHA512.
void sha512_update (struct sha512_ctx *ctx, const void *data, unsigned int len)
 Process more data.
void sha512_final (struct sha512_ctx *ctx, uint8_t *dst)
 Calculate final result.
void sha384_reset (struct sha512_ctx *ctx)
 Initialize structure for SHA384.
void sha384_update (struct sha512_ctx *ctx, const void *data, unsigned int len)
 Process more data.
void sha384_final (struct sha512_ctx *ctx, uint8_t *dst)
 Calculate final result.

Detailed Description

SHA512 and SHA384 cryptographic hashes.


Define Documentation

SHA384 block size in bytes.

SHA512 block size in bytes.

SHA384 result length in bytes.

SHA512 result length in bytes.


Function Documentation

void sha512_reset ( struct sha512_ctx ctx)

Initialize structure for SHA512.

void sha512_update ( struct sha512_ctx ctx,
const void *  data,
unsigned int  len 
)

Process more data.

void sha512_final ( struct sha512_ctx ctx,
uint8_t *  dst 
)

Calculate final result.

void sha384_reset ( struct sha512_ctx ctx)

Initialize structure for SHA384.

void sha384_update ( struct sha512_ctx ctx,
const void *  data,
unsigned int  len 
)

Process more data.

void sha384_final ( struct sha512_ctx ctx,
uint8_t *  dst 
)

Calculate final result.