|
BSL v1.0.0 - 16.g9d98179
AMMOS Bundle Protocol Security Library (BSL)
|
Declarations for BPv7 block CRC handling. More...
Include dependency graph for crc.c:Functions | |
| static uint16_t | bp_crc16 (UsefulBufC data) |
| static uint32_t | bp_crc32 (UsefulBufC data) |
| void | mock_bpa_crc_apply (UsefulBuf buf, size_t begin, size_t end, BSL_BundleCRCType_e crc_type) |
| Apply a CRC function to an encoded block. | |
| bool | mock_bpa_crc_check (UsefulBufC buf, size_t begin, size_t end, BSL_BundleCRCType_e crc_type) |
| Check the CRC of an encoded block. | |
Declarations for BPv7 block CRC handling.
|
static |
Referenced by mock_bpa_crc_apply(), and mock_bpa_crc_check().
|
static |
Referenced by mock_bpa_crc_apply(), and mock_bpa_crc_check().
| void mock_bpa_crc_apply | ( | UsefulBuf | buf, |
| size_t | begin, | ||
| size_t | end, | ||
| BSL_BundleCRCType_e | crc_type | ||
| ) |
Apply a CRC function to an encoded block.
| buf | The buffer holding the encoded block. The buffer contents will be modified to hold the correct CRC value. |
| begin | The start of the block array |
| end | The end of the block array |
| crc_type | The needed CRC type. |
References bp_crc16(), bp_crc32(), BSL_BUNDLECRCTYPE_16, BSL_BUNDLECRCTYPE_32, BSL_BUNDLECRCTYPE_NONE, and buf.
Referenced by bsl_mock_encode_canonical(), and bsl_mock_encode_primary().
| bool mock_bpa_crc_check | ( | UsefulBufC | buf, |
| size_t | begin, | ||
| size_t | end, | ||
| BSL_BundleCRCType_e | crc_type | ||
| ) |
Check the CRC of an encoded block.
| buf | The buffer holding the encoded block. |
| begin | The start of the block array |
| end | The end of the block array |
| crc_type | The needed CRC type. |
References bp_crc16(), bp_crc32(), BSL_BUNDLECRCTYPE_16, BSL_BUNDLECRCTYPE_32, BSL_BUNDLECRCTYPE_NONE, and buf.
Referenced by bsl_mock_decode_canonical(), and bsl_mock_decode_primary().