MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / valueDecoder

Method valueDecoder

pager_lib/pyasn1/codec/ber/decoder.py:385–402  ·  view source on GitHub ↗
(self, substrate, asn1Spec,
                     tagSet=None, length=None, state=None,
                     decodeFun=None, substrateFun=None,
                     **options)

Source from the content-addressed store, hash-verified

383 protoComponent = univ.Null('')
384
385 def valueDecoder(self, substrate, asn1Spec,
386 tagSet=None, length=None, state=None,
387 decodeFun=None, substrateFun=None,
388 **options):
389
390 if tagSet[0].tagFormat != tag.tagFormatSimple:
391 raise error.PyAsn1Error('Simple tag format expected')
392
393 for chunk in readFromStream(substrate, length, options):
394 if isinstance(chunk, SubstrateUnderrunError):
395 yield chunk
396
397 component = self._createComponent(asn1Spec, tagSet, '', **options)
398
399 if chunk:
400 raise error.PyAsn1Error('Unexpected %d-octet substrate for Null' % length)
401
402 yield component
403
404
405class ObjectIdentifierPayloadDecoder(AbstractSimplePayloadDecoder):

Callers

nothing calls this directly

Calls 2

readFromStreamFunction · 0.90
_createComponentMethod · 0.45

Tested by

no test coverage detected