NanoCBOR
NanoCBOR copied to clipboard
CBOR library aimed at heavily constrained devices
This PR adds support for [packed CBOR shared items](https://www.ietf.org/archive/id/draft-ietf-cbor-packed-11.html#name-referencing-shared-items) to NanoCBOR, handling them (mostly) transparently to the user. The following is supported for now: - [basic packed CBOR table setup](https://www.ietf.org/archive/id/draft-ietf-cbor-packed-11.html#name-basic-packed-cbor)...
cbor tags aren't limited in # of bits. This PR allows to handle 64 bits wide tags.
Code for reproducing ``` #include #include int main(void) { char encode_buf[1024]; nanocbor_encoder_t cbor_encoder; nanocbor_encoder_init(&cbor_encoder, encode_buf, 1024); nanocbor_fmt_map(&cbor_encoder, 2); nanocbor_put_tstr(&cbor_encoder, "key1"); nanocbor_put_tstr(&cbor_encoder, "value1"); nanocbor_put_tstr(&cbor_encoder, "key2"); nanocbor_put_tstr(&cbor_encoder, "value2"); nanocbor_value_t cbor_decoder; nanocbor_value_t cbor_encoded_val;...
The documentation of `nanocbor_leave_container()` states the following preconditions: > This must be called with the same @ref nanocbor_value_t struct that was used to enter the container (1). Furthermore, the @p...
As per [RFC8949](https://www.rfc-editor.org/rfc/rfc8949.html#section-3.4), tags consist of both a tag number and an _enclosed_ data item. When skipping a tag, the enclosed data item should be skipped, too. This PR adds...
to match the docs This aligns with most of the other `nanocbor_get_*` functions that also return `NANOCBOR_OK` instead of the number of bytes read. However, while looking at this, I...
This is a low-level API matching nanocbor_get_simple() and allowing oblivious packed CBOR support.
Hi :waffle: This shows a low effort, cheap & dirty fuzzing harness for AFL++ in persistent mode. It is based on the pretty-printer example. I removed the prints for speed-up....
When using NanoCBOR with the waspmote-pro board (in RIOT), I get the following error: ```sh $ BOARD=waspmote-pro make -C tests/pkg_nanocbor make: Entering directory '/home/jdavid/sandboxes/UiO/RIOT/tests/pkg_nanocbor' Building application "tests_pkg_nanocbor" for "waspmote-pro" with...