def fingerprint_contents(self):
"""Produce the contents of the condition hash.
This function is called internally by the ``condition``
method/property.
Returns:
bytes: Encoded contents of fingerprint hash.
"""
if not self.subcondition:
raise MissingDataError('Requires subcondition')
try:
subcondition_asn1_dict = self.subcondition.condition.to_asn1_dict()
except AttributeError:
subcondition_asn1_dict = self.subcondition.to_asn1_dict()
return der_encode(nat_decode({
'prefix': self.prefix,
'maxMessageLength': self.max_message_length,
'subcondition': subcondition_asn1_dict,
}, asn1Spec=PrefixFingerprintContents()))
评论列表
文章目录