|
Rizin
unix-like reverse engineering framework and cli tools
|
Internal API to different integrity check functions. More...
#include "common.h"Go to the source code of this file.
Classes | |
| 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.
Definition in file check.h.
| #define LZMA_CHECK_BEST LZMA_CHECK_CRC32 |
| void lzma_check_finish | ( | lzma_check_state * | check, |
| lzma_check | type | ||
| ) |
Finish the check calculation and store the result to check->buffer.u8.
Definition at line 148 of file check.c.
References check, conv32le, conv64le, LZMA_CHECK_CRC32, LZMA_CHECK_CRC64, LZMA_CHECK_SHA256, lzma_sha256_finish(), and type.
Referenced by block_buffer_encode(), block_decode(), and block_encode().
| void lzma_check_init | ( | lzma_check_state * | check, |
| lzma_check | type | ||
| ) |
Initialize *check depending on type.
Definition at line 84 of file check.c.
References check, LZMA_CHECK_CRC32, LZMA_CHECK_CRC64, LZMA_CHECK_NONE, LZMA_CHECK_SHA256, lzma_sha256_init(), and type.
Referenced by block_buffer_encode(), LZMA_API(), lzma_block_decoder_init(), and lzma_block_encoder_init().
| void lzma_check_update | ( | lzma_check_state * | check, |
| lzma_check | type, | ||
| const uint8_t * | buf, | ||
| size_t | size | ||
| ) |
Update the check state.
Definition at line 117 of file check.c.
References check, LZMA_CHECK_CRC32, LZMA_CHECK_CRC64, LZMA_CHECK_SHA256, lzma_sha256_update(), and type.
Referenced by block_buffer_encode(), block_decode(), block_encode(), and hash_append().
| void lzma_sha256_finish | ( | lzma_check_state * | check | ) |
| void lzma_sha256_init | ( | lzma_check_state * | check | ) |
| void lzma_sha256_update | ( | const uint8_t * | buf, |
| size_t | size, | ||
| lzma_check_state * | check | ||
| ) |
lzma_crc32_table[0] is needed by LZ encoder so we need to keep the array two-dimensional.
Definition at line 16 of file crc32_small.c.
Referenced by LZMA_API().
Definition at line 3 of file crc64_table_be.h.
Referenced by LZMA_API().