prefix.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:cryptoconditions 作者: bigchaindb 项目源码 文件源码
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()))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号