BSL v0.0.0
AMMOS Bundle Protocol Security Library (BSL)
|
Declarations for BPv7 block CRC handling. More...
#include "bsl_mock_bpa_crc.h"
#include <arpa/inet.h>
#include <inttypes.h>
#include <BPSecLib_Public.h>
Go to the source code of this file.
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.
Definition in file bsl_mock_bpa_crc.c.
|
static |
Definition at line 33 of file bsl_mock_bpa_crc.c.
|
static |
Definition at line 39 of file bsl_mock_bpa_crc.c.
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. |
Definition at line 45 of file bsl_mock_bpa_crc.c.
References BSL_BUNDLECRCTYPE_16, BSL_BUNDLECRCTYPE_32, and BSL_BUNDLECRCTYPE_NONE.
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. |
Definition at line 87 of file bsl_mock_bpa_crc.c.
References BSL_BUNDLECRCTYPE_16, BSL_BUNDLECRCTYPE_32, and BSL_BUNDLECRCTYPE_NONE.
Referenced by bsl_mock_decode_canonical(), and bsl_mock_decode_primary().