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

Sequential reader interface. More...

#include <stddef.h>
#include <stdint.h>
+ Include dependency graph for SeqReader.h:
+ This graph shows which files directly or indirectly include this file:

Functions

void BSL_SeqReader_Destroy (BSL_SeqReader_t *obj)
 Release resources from a sequential reader.
 
int BSL_SeqReader_Get (BSL_SeqReader_t *obj, uint8_t *buf, size_t *bufsize)
 Iterate a sequential reader.
 

Detailed Description

Sequential reader interface.

Function Documentation

◆ BSL_SeqReader_Destroy()

void BSL_SeqReader_Destroy ( BSL_SeqReader_t *  obj)

Release resources from a sequential reader.

This also frees memory of the instance itself.

Parameters
[in,out]objThe reader handle.

References ASSERT_ARG_NONNULL, ASSERT_PRECONDITION, and BSL_free().

Referenced by BSL_API_QuerySecurity(), BSL_ExecAnyVerifierAcceptor_Pre(), BSLX_BCB_Decrypt(), BSLX_BCB_Encrypt(), BSLX_BIB_GenIPPT(), BSLX_CoseSc_Encrypt_Compute(), BSLX_CoseSc_Mac_Compute(), switch(), TEST_CASE(), test_decrypt(), test_encrypt(), and test_SeqReader_flat().

◆ BSL_SeqReader_Get()

int BSL_SeqReader_Get ( BSL_SeqReader_t *  obj,
uint8_t *  buf,
size_t *  bufsize 
)

Iterate a sequential reader.

Parameters
[in,out]objThe reader handle.
[out]bufThe output buffer to fill.
[in,out]bufsizeThe available output buffer size as input, set to the used buffer size as output.
Returns
Zero if successful.

References ASSERT_ARG_NONNULL, ASSERT_PRECONDITION, and CHK_ARG_NONNULL.

Referenced by BSL_API_QuerySecurity(), BSL_AuthCtx_DigestSeq(), BSL_Cipher_AddAadSeq(), BSL_Cipher_AddSeq(), BSL_ExecAnyVerifierAcceptor_Pre(), BSLX_BIB_GenIPPT(), BSLX_CoseSc_Encrypt_Compute(), TEST_CASE(), and test_SeqReader_flat().