BSL v1.1.1 - 39.g9f43410
AMMOS Bundle Protocol Security Library (BSL)
Loading...
Searching...
No Matches
encode.h File Reference

Declarations for bundle and block encoding. More...

#include "bundle.h"
#include "eid.h"
#include <qcbor/qcbor_encode.h>
+ Include dependency graph for encode.h:
+ This graph shows which files directly or indirectly include this file:

Functions

int bsl_mock_encode_eid (const BSL_HostEID_t *eid, BSL_Data_t *encoded_bytes, size_t *encoded_size)
 Encode a single EID.
 
int bsl_mock_encode_primary (QCBOREncodeContext *enc, const MockBPA_PrimaryBlock_t *blk)
 Encode primary block to a CBOR data.
 
int bsl_mock_encode_canonical (QCBOREncodeContext *enc, const MockBPA_CanonicalBlock_t *blk)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
int bsl_mock_encode_bundle (QCBOREncodeContext *enc, const MockBPA_Bundle_t *bundle)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 

Detailed Description

Declarations for bundle and block encoding.

Function Documentation

◆ bsl_mock_encode_bundle()

int bsl_mock_encode_bundle ( QCBOREncodeContext *  enc,
const MockBPA_Bundle_t bundle 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

References MockBPA_Bundle_t::blocks, bsl_mock_encode_canonical(), bsl_mock_encode_primary(), and MockBPA_Bundle_t::primary_block.

Referenced by LLVMFuzzerTestOneInput(), mock_bpa_ctr_encode(), test_bsl_mock_encode_bundle(), and TEST_CASE().

◆ bsl_mock_encode_canonical()

int bsl_mock_encode_canonical ( QCBOREncodeContext *  enc,
const MockBPA_CanonicalBlock_t blk 
)

◆ bsl_mock_encode_eid()

int bsl_mock_encode_eid ( const BSL_HostEID_t eid,
BSL_Data_t encoded_bytes,
size_t *  encoded_size 
)

◆ bsl_mock_encode_primary()