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

Sequential reader interface. More...

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

Functions

void BSL_SeqWriter_Destroy (BSL_SeqWriter_t *obj, bool success)
 Release resources from a sequential writer and possibly commit the writes.
 
int BSL_SeqWriter_Put (BSL_SeqWriter_t *obj, const uint8_t *buf, size_t bufsize)
 Iterate a sequential writer.
 

Detailed Description

Sequential reader interface.

Function Documentation

◆ BSL_SeqWriter_Destroy()

void BSL_SeqWriter_Destroy ( BSL_SeqWriter_t *  obj,
bool  success 
)

Release resources from a sequential writer and possibly commit the writes.

This also frees memory of the instance itself.

Parameters
[in,out]objThe writer handle.
successSet true if all of the writing succeeded.

References ASSERT_ARG_NONNULL, ASSERT_PRECONDITION, and BSL_free().

Referenced by BSLX_BCB_Decrypt(), BSLX_BCB_Encrypt(), BSLX_CoseSc_Encrypt_Compute(), Encode_ASB(), test_decrypt(), test_encrypt(), and test_SeqWriter_flat().

◆ BSL_SeqWriter_Put()

int BSL_SeqWriter_Put ( BSL_SeqWriter_t *  obj,
const uint8_t *  buf,
size_t  bufsize 
)

Iterate a sequential writer.

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

References CHK_ARG_NONNULL.

Referenced by BSL_Cipher_AddSeq(), BSL_Cipher_FinalizeSeq(), BSLX_CoseSc_Encrypt_Compute(), Encode_ASB(), and test_SeqWriter_flat().