Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
check.h File Reference

Internal API to different integrity check functions. More...

#include "common.h"

Go to the source code of this file.

Data Structures

struct  lzma_sha256_state
 State for the internal SHA-256 implementation. More...
 
struct  lzma_check_state
 Structure to hold internal state of the check being calculated. More...
 

Macros

#define HAVE_INTERNAL_SHA256   1
 
#define LZMA_CHECK_BEST   LZMA_CHECK_CRC32
 

Functions

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.
 
void lzma_sha256_init (lzma_check_state *check)
 Prepare SHA-256 state for new input.
 
void lzma_sha256_update (const uint8_t *buf, size_t size, lzma_check_state *check)
 Update the SHA-256 hash state.
 
void lzma_sha256_finish (lzma_check_state *check)
 Finish the SHA-256 calculation and store the result to check->buffer.u8.
 

Variables

const uint32_t lzma_crc32_table [8][256]
 
const uint64_t lzma_crc64_table [4][256]
 

Detailed Description

Internal API to different integrity check functions.

Macro Definition Documentation

◆ HAVE_INTERNAL_SHA256

#define HAVE_INTERNAL_SHA256   1

◆ LZMA_CHECK_BEST

#define LZMA_CHECK_BEST   LZMA_CHECK_CRC32

Function Documentation

◆ lzma_check_finish()

void lzma_check_finish ( lzma_check_state * check,
lzma_check type )
extern

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

◆ lzma_check_init()

void lzma_check_init ( lzma_check_state * check,
lzma_check type )
extern

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.

◆ lzma_check_update()

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

Update the check state.

◆ lzma_sha256_finish()

void lzma_sha256_finish ( lzma_check_state * check)
extern

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

◆ lzma_sha256_init()

void lzma_sha256_init ( lzma_check_state * check)
extern

Prepare SHA-256 state for new input.

◆ lzma_sha256_update()

void lzma_sha256_update ( const uint8_t * buf,
size_t size,
lzma_check_state * check )
extern

Update the SHA-256 hash state.

Variable Documentation

◆ lzma_crc32_table

const uint32_t lzma_crc32_table[8][256]
extern

lzma_crc32_table[0] is needed by LZ encoder so we need to keep the array two-dimensional.

◆ lzma_crc64_table

const uint64_t lzma_crc64_table[4][256]
extern