There are :py:func:`pyderasn.tag_ctxp` and :py:func:`pyderasn.tag_ctxc`
functions, allowing you to easily create ``CONTEXT``
``PRIMITIVE``/``CONSTRUCTED`` tags, by specifying only the required tag
-number. Pay attention that explicit tags always have *constructed* tag
-(``tag_ctxc``), but implicit tags for primitive types are primitive
-(``tag_ctxp``).
+number.
+
+.. note::
+
+ EXPLICIT tags always have **constructed** tag. PyDERASN does not
+ explicitly check correctness of schema input here.
+
+.. note::
+
+ Implicit tags have **primitive** (``tag_ctxp``) encoding for
+ primitive values.
::
______________________________
Sometimes you either can not or do not want to explicitly set *defines*
-in the scheme. You can dynamically apply those definitions when calling
+in the schema. You can dynamically apply those definitions when calling
``.decode()`` method.
Specify ``defines_by_path`` key in the :ref:`decode context <ctx>`. Its
from datetime import datetime
from datetime import timedelta
from math import ceil
-from os import environ
from string import ascii_letters
from string import digits
from sys import version_info
:param ctx: optional :ref:`context <ctx>` governing decoding process
:param tag_only: decode only the tag, without length and contents
(used only in Choice and Set structures, trying to
- determine if tag satisfies the scheme)
+ determine if tag satisfies the schema)
:param _ctx_immutable: do we need to ``copy.copy()`` ``ctx``
before using it?
:returns: (Obj, remaining data)
if args.defines_by_path is not None:
ctx["defines_by_path"] = obj_by_path(args.defines_by_path)
obj, tail = schema().decode(der, ctx=ctx)
+ from os import environ
print(pprinter(
obj,
oid_maps=oid_maps,