← Back to context

Comment by johnisgood

2 days ago

Does it support constraints?

It is a C library, and does not implement ASN.1 schema at all, only implements reading/writing the data. The caller is expected to implement most constraints that would be required, although you can limit the size of data being read, and the functions for decoding integers will automatically check that the type is correct (although you can disable type checking) and will limit the values to those that fit in the variable that the decoded value is stored in (e.g. signed 64-bits, unsigned 8-bits, etc), and other functions that decode specific values will also normally check the type (although you can tell it to not check the type).