31 CHK_ARG_NONNULL(self);
32 CHK_ARG_EXPR(content.
len > 0);
33 CHK_ARG_NONNULL(content.
ptr);
35 memset(self, 0,
sizeof(*self));
39 CHK_PROPERTY(content.
len <
sizeof(self->
_bytes));
49 CHK_AS_BOOL(self != NULL);
struct BSL_SecResult_s BSL_SecResult_t
Represents a security result, being a 2-tuple of (result-id, bytes).
@ BSL_SUCCESS
Placeholder for non-error code.
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 SecResult.
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_t.
Defines the RFC 9172 Security Result.
Heap data storage and views.
size_t len
Size of the data buffer.
BSL_DataPtr_t ptr
Pointer to the front of the buffer.
uint8_t _bytes[BSL_DEFAULT_BYTESTR_LEN+1]
Result as byte array, up to a given maximum.
uint64_t target_block_num
Target block id, put in here for convenience.
uint64_t result_id
Result ID, which is context depdendent, based on security context.
size_t _bytelen
Length of data (in bytes) of the contained bytestring. Always less than BSL_DEFAULT_BYTESTR_LEN.
uint64_t context_id
Context ID, put in here for convenience.