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

SHA1 implementation. More...

Data Structures

struct  sha1_ctx
 SHA1 state. More...

Defines

#define SHA1_BLOCK_SIZE
 Block length for SHA1.
#define SHA1_DIGEST_LENGTH
 Result length for SHA1.

Functions

void sha1_reset (struct sha1_ctx *ctx)
 Clean state.
void sha1_update (struct sha1_ctx *ctx, const void *data, unsigned int len)
 Update state with more data.
void sha1_final (struct sha1_ctx *ctx, uint8_t *dst)
 Get final result.

Detailed Description

SHA1 implementation.


Define Documentation

#define SHA1_BLOCK_SIZE

Block length for SHA1.

Result length for SHA1.


Function Documentation

void sha1_reset ( struct sha1_ctx ctx)

Clean state.

void sha1_update ( struct sha1_ctx ctx,
const void *  data,
unsigned int  len 
)

Update state with more data.

void sha1_final ( struct sha1_ctx ctx,
uint8_t *  dst 
)

Get final result.