TE_CSTRING_BUFFER
#include <teagent_c.h>
A caller-owned byte buffer described by its length AND its capacity.
One descriptor per string, for both directions. The caller sets data, input_len and capacity; the call sets output_len and never reads it on entry.
datastorage owned by the caller. Never freed or reallocated by the SDK.input_lenhow many bytes atdatamay be READ, EXCLUDING any terminator. On a pure output descriptor this is zero.capacityhow many bytes atdatamay be WRITTEN, including the room for the NUL the SDK always writes. Zero is never valid.
input_len and capacity are INDEPENDENT extents, and neither has to bound the other: decryption reads a ciphertext that is always longer than the plaintext it writes back. A caller making the ordinary in-place call sets capacity to the real size of the buffer and input_len to the bytes already in it.
output_lenon success, the bytes written excluding the NUL. On TE_INSUFFICIENT_BUFFER_SIZE, the capacity that WOULD have been required, including the NUL — so a caller can size a retry from it.
© Pi Soft, 2018-2026 · Tricryption Engine 8.1
Public Attributes
| Type | Name | Description |
|---|---|---|
| unsigned char * | data | |
| uint32_t | input_len | |
| uint32_t | capacity | |
| uint32_t | output_len |