本文整理汇总了Python中pyasn1.codec.cer.encoder.Encoder方法的典型用法代码示例。如果您正苦于以下问题:Python encoder.Encoder方法的具体用法?Python encoder.Encoder怎么用?Python encoder.Encoder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyasn1.codec.cer.encoder
的用法示例。
在下文中一共展示了encoder.Encoder方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __call__
# 需要导入模块: from pyasn1.codec.cer import encoder [as 别名]
# 或者: from pyasn1.codec.cer.encoder import Encoder [as 别名]
def __call__(self, client, defMode=True, maxChunkSize=0):
if not defMode:
raise error.PyAsn1Error('DER forbids indefinite length mode')
return encoder.Encoder.__call__(self, client, defMode, maxChunkSize)
示例2: __call__
# 需要导入模块: from pyasn1.codec.cer import encoder [as 别名]
# 或者: from pyasn1.codec.cer.encoder import Encoder [as 别名]
def __call__(self, client, defMode=True, maxChunkSize=0):
if not defMode or maxChunkSize:
raise error.PyAsn1Error('DER forbids indefinite length mode')
return encoder.Encoder.__call__(self, client, defMode, maxChunkSize)
#: Turns ASN.1 object into DER octet stream.
#:
#: Takes any ASN.1 object (e.g. :py:class:`~pyasn1.type.base.PyAsn1Item` derivative)
#: walks all its components recursively and produces a DER octet stream.
#:
#: Parameters
#: ----------
# value: any pyasn1 object (e.g. :py:class:`~pyasn1.type.base.PyAsn1Item` derivative)
#: A pyasn1 object to encode
#:
#: defMode: :py:class:`bool`
#: If `False`, produces indefinite length encoding
#:
#: maxChunkSize: :py:class:`int`
#: Maximum chunk size in chunked encoding mode (0 denotes unlimited chunk size)
#:
#: Returns
#: -------
#: : :py:class:`bytes` (Python 3) or :py:class:`str` (Python 2)
#: Given ASN.1 object encoded into BER octetstream
#:
#: Raises
#: ------
#: : :py:class:`pyasn1.error.PyAsn1Error`
#: On encoding errors
示例3: __call__
# 需要导入模块: from pyasn1.codec.cer import encoder [as 别名]
# 或者: from pyasn1.codec.cer.encoder import Encoder [as 别名]
def __call__(self, client, defMode=1, maxChunkSize=0):
return encoder.Encoder.__call__(self, client, defMode, maxChunkSize)