3 TeS@s|ddlmZmZmZddlmZddlmZmZm Z m Z m Z ddl m Z ddZddZGd d d eZd d Zd dZdS))absolute_importdivisionprint_function)utils) DERReaderINTEGERSEQUENCE encode_derencode_der_integer)hashesc Cs>t|jt&}|jtj}|jtj}||fSQRXdS)N)rZread_single_elementrZ read_elementrZ as_integer) signatureseqrsr/usr/lib64/python3.6/utils.pydecode_dss_signaturesrcCs ttttt|ttt|S)N)r rrr )rrrrrencode_dss_signatures rc@seZdZddZejdZdS) PrehashedcCs&t|tjstd||_|j|_dS)Nz#Expected instance of HashAlgorithm.) isinstancer Z HashAlgorithm TypeErrorZ _algorithm digest_size _digest_size)self algorithmrrr__init__"s zPrehashed.__init__rN)__name__ __module__ __qualname__rrZread_only_propertyrrrrrr!srcCst|S)N)r)r rrrdecode_rfc6979_signature,srcCs t||S)N)r)rrrrrencode_rfc6979_signature0sr N)Z __future__rrrZ cryptographyrZcryptography.hazmat._derrrrr r Zcryptography.hazmat.primitivesr rrobjectrrr rrrrs