/* * Generated using zcbor version 0.8.99 * https://github.com/NordicSemiconductor/zcbor * Generated with a --default-max-qty of 3 */ #include #include #include #include #include "zcbor_decode.h" #include "cbor/edhoc_decode_message_3.h" #include "zcbor_print.h" #if DEFAULT_MAX_QTY != 3 #error "The type file was generated with a different default_max_qty than this file" #endif static bool decode_m3_CIPHERTEXT_3(zcbor_state_t *state, struct zcbor_string *result); static bool decode_m3_CIPHERTEXT_3( zcbor_state_t *state, struct zcbor_string *result) { zcbor_log("%s\r\n", __func__); bool tmp_result = (((zcbor_bstr_decode(state, (&(*result)))))); if (!tmp_result) { zcbor_trace_file(state); zcbor_log("%s error: %s\r\n", __func__, zcbor_error_str(zcbor_peek_error(state))); } else { zcbor_log("%s success\r\n", __func__); } return tmp_result; } int cbor_decode_m3_CIPHERTEXT_3( const uint8_t *payload, size_t payload_len, struct zcbor_string *result, size_t *payload_len_out) { zcbor_state_t states[2]; return zcbor_entry_function(payload, payload_len, (void *)result, payload_len_out, states, (zcbor_decoder_t *)decode_m3_CIPHERTEXT_3, sizeof(states) / sizeof(zcbor_state_t), 1); }