Go to the source code of this file.
◆ AS_CDT_CTX_VALUE
#define AS_CDT_CTX_VALUE 0x2 |
◆ as_cdt_ctx_base64_capacity()
Return estimated base64 encoded size of ctx. Return zero on error.
◆ as_cdt_ctx_byte_capacity()
Return exact serialized size of ctx. Return zero on error.
◆ as_cdt_ctx_from_base64()
Deserialize base64 encoded string to ctx.
- Parameters
-
ctx | Target CDT context. |
base64 | Source base64 encoded string. |
- Returns
- true on success, false on error.
◆ as_cdt_ctx_from_bytes()
AS_EXTERN bool as_cdt_ctx_from_bytes |
( |
as_cdt_ctx * | ctx, |
|
|
const uint8_t * | bytes, |
|
|
uint32_t | size ) |
Deserialize bytes to ctx.
- Parameters
-
ctx | Target CDT context. |
bytes | Source byte array. |
size | Length of source byte array. |
- Returns
- true on success, false on error.
◆ as_cdt_ctx_to_base64()
AS_EXTERN bool as_cdt_ctx_to_base64 |
( |
const as_cdt_ctx * | ctx, |
|
|
char * | base64, |
|
|
uint32_t | capacity ) |
Serialize ctx to base64 encoded string. Use as_cdt_ctx_base64_capacity() to determine required string capacity.
- Parameters
-
ctx | Source CDT context. |
base64 | Target base64 encoded null terminated string which must be allocated before calling this function. |
capacity | Max size of base64 encoded string. |
- Returns
- true on success, false on error.
◆ as_cdt_ctx_to_bytes()
AS_EXTERN uint32_t as_cdt_ctx_to_bytes |
( |
const as_cdt_ctx * | ctx, |
|
|
uint8_t * | bytes, |
|
|
uint32_t | capacity ) |
Serialize ctx to bytes. Use as_cdt_ctx_byte_capacity() to determine required bytes capacity.
- Parameters
-
ctx | Source CDT context. |
bytes | Target bytes array which must be allocated before calling this function. |
capacity | Max size of bytes array. |
- Returns
- Length of serialized bytes on success or zero on error.