XZ Utils 5.4.1
|
Internal API to different integrity check functions. More...
#include "common.h"
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. More... | |
void | lzma_check_update (lzma_check_state *check, lzma_check type, const uint8_t *buf, size_t size) |
Update the check state. More... | |
void | lzma_check_finish (lzma_check_state *check, lzma_check type) |
Finish the check calculation and store the result to check->buffer.u8. More... | |
void | lzma_sha256_init (lzma_check_state *check) |
Prepare SHA-256 state for new input. More... | |
void | lzma_sha256_update (const uint8_t *buf, size_t size, lzma_check_state *check) |
Update the SHA-256 hash state. More... | |
void | lzma_sha256_finish (lzma_check_state *check) |
Finish the SHA-256 calculation and store the result to check->buffer.u8. More... | |
Variables | |
const uint32_t | lzma_crc32_table [8][256] |
const uint64_t | lzma_crc64_table [4][256] |
Internal API to different integrity check functions.
void lzma_check_init | ( | lzma_check_state * | check, |
lzma_check | type | ||
) |
Initialize *check depending on type.
References check, LZMA_CHECK_CRC32, LZMA_CHECK_CRC64, LZMA_CHECK_NONE, LZMA_CHECK_SHA256, and lzma_sha256_init().
void lzma_check_update | ( | lzma_check_state * | check, |
lzma_check | type, | ||
const uint8_t * | buf, | ||
size_t | size | ||
) |
Update the check state.
References check, LZMA_CHECK_CRC32, LZMA_CHECK_CRC64, LZMA_CHECK_SHA256, lzma_crc32(), lzma_crc64(), and lzma_sha256_update().
void lzma_check_finish | ( | lzma_check_state * | check, |
lzma_check | type | ||
) |
Finish the check calculation and store the result to check->buffer.u8.
References check, and LZMA_CHECK_CRC32.
Referenced by lzma_index_hash_decode().
void lzma_sha256_init | ( | lzma_check_state * | check | ) |
void lzma_sha256_update | ( | const uint8_t * | buf, |
size_t | size, | ||
lzma_check_state * | check | ||
) |
void lzma_sha256_finish | ( | lzma_check_state * | check | ) |
Finish the SHA-256 calculation and store the result to check->buffer.u8.
References check.
|
extern |
lzma_crc32_table[0] is needed by LZ encoder so we need to keep the array two-dimensional.