src/liblzma/check/check.c File Reference

Single API to access different integrity checks. More...

#include "check.h"

Functions

 LZMA_API (lzma_bool)
 LZMA_API (uint32_t)
void lzma_check_init (lzma_check_state *check, lzma_check type)
 Initialize *check depending on type.
void lzma_check_update (lzma_check_state *check, lzma_check type, const uint8_t *buf, size_t size)
 Update the check state.
void lzma_check_finish (lzma_check_state *check, lzma_check type)
 Finish the check calculation and store the result to check->buffer.u8.

Detailed Description

Single API to access different integrity checks.


Function Documentation

void lzma_check_init ( lzma_check_state check,
lzma_check  type 
)

Initialize *check depending on type.

Returns:
LZMA_OK on success. LZMA_UNSUPPORTED_CHECK if the type is not supported by the current version or build of liblzma. LZMA_PROG_ERROR if type > LZMA_CHECK_ID_MAX.

References LZMA_CHECK_CRC32, LZMA_CHECK_CRC64, LZMA_CHECK_NONE, LZMA_CHECK_SHA256, lzma_sha256_init(), and lzma_check_state::state.

void lzma_check_update ( lzma_check_state check,
lzma_check  type,
const uint8_t *  buf,
size_t  size 
)
void lzma_check_finish ( lzma_check_state check,
lzma_check  type 
)

Finish the check calculation and store the result to check->buffer.u8.

References lzma_check_state::buffer, LZMA_CHECK_CRC32, LZMA_CHECK_CRC64, LZMA_CHECK_SHA256, lzma_sha256_finish(), and lzma_check_state::state.


Generated on Tue Oct 6 14:02:22 2009 for XZ Utils by  doxygen 1.6.1