summaryrefslogtreecommitdiff
path: root/pyasn1/codec/cer/decoder.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyasn1/codec/cer/decoder.py')
-rw-r--r--pyasn1/codec/cer/decoder.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/pyasn1/codec/cer/decoder.py b/pyasn1/codec/cer/decoder.py
index 3cc29c7..2a9d94f 100644
--- a/pyasn1/codec/cer/decoder.py
+++ b/pyasn1/codec/cer/decoder.py
@@ -89,4 +89,26 @@ class Decoder(decoder.Decoder):
#: ------
#: :py:class:`~pyasn1.error.PyAsn1Error`
#: On decoding errors
+#:
+#: Examples
+#: --------
+#: Decode CER serialisation without ASN.1 schema
+#:
+#: .. code-block:: pycon
+#:
+#: >>> s, _ = decode(b'0\x80\x02\x01\x01\x02\x01\x02\x02\x01\x03\x00\x00')
+#: >>> print(s.prettyPrint())
+#: SequenceOf:
+#: 1 2 3
+#:
+#: Decode CER serialisation with ASN.1 schema
+#:
+#: .. code-block:: pycon
+#:
+#: >>> seq = SequenceOf(componentType=Integer())
+#: >>> s, _ = decode(b'0\x80\x02\x01\x01\x02\x01\x02\x02\x01\x03\x00\x00', asn1Spec=seq)
+#: >>> print(s.prettyPrint())
+#: SequenceOf:
+#: 1 2 3
+#:
decode = Decoder(tagMap, decoder.typeMap)