BSL v0.0.0 - 0.geda3e66
AMMOS Bundle Protocol Security Library (BSL)
|
Implementation of a RFC9172 Result. More...
#include "SecResult.h"
Functions | |
int | BSL_SecResult_Init (BSL_SecResult_t *self, uint64_t result_id, uint64_t context_id, uint64_t target_block_num, BSL_Data_t content) |
Populate a pre-allocated result. | |
bool | BSL_SecResult_IsConsistent (const BSL_SecResult_t *self) |
Return true when internal invariant checks pass. | |
size_t | BSL_SecResult_Sizeof (void) |
Returns size in bytes of BSL_SecResult_s. | |
Implementation of a RFC9172 Result.
int BSL_SecResult_Init | ( | BSL_SecResult_t * | self, |
uint64_t | result_id, | ||
uint64_t | context_id, | ||
uint64_t | target_block_num, | ||
BSL_Data_t | content | ||
) |
Populate a pre-allocated result.
[in,out] | self | Non-NULL pointer to allocated result. |
[in] | result_id | Result ID of corresponding result bytestring, meaning dependent on security context. |
[in] | context_id | ID of security context. |
[in] | target_block_num | Target of the given security result, included here for convenience. |
[in] | content | Read-only view to data containing the bytes of the security result, which is copied out of here. |
References BSL_SecResult_IsConsistent(), BSL_SUCCESS, BSL_Data_t::len, and BSL_Data_t::ptr.
Referenced by BSL_AbsSecBlock_DecodeFromCBOR().
bool BSL_SecResult_IsConsistent | ( | const BSL_SecResult_t * | self | ) |
Return true when internal invariant checks pass.
self | This security result |
Referenced by BSL_SecOutcome_AppendResult(), and BSL_SecResult_Init().