o
    ™¨Êh¸  ã                   @   s|   d dl mZmZmZ d dlZd dlmZ d dlZd dlm	Z	 d dl
mZ dd„ Zdd	„ Zd
d„ Zdd„ ZG dd„ deƒZdS )é    )Úabsolute_importÚdivisionÚprint_functionN)ÚDSASignature)Úutils)Úhashesc                 C   s   t jdtjdd� t| ƒS )Nzqdecode_rfc6979_signature is deprecated and will be removed in a future version, use decode_dss_signature instead.é   ©Ú
stacklevel)ÚwarningsÚwarnr   ÚPersistentlyDeprecatedÚdecode_dss_signature)Ú	signature© r   úa/var/www/html/env/lib/python3.10/site-packages/cryptography/hazmat/primitives/asymmetric/utils.pyÚdecode_rfc6979_signature   s   ür   c                 C   s    t j| dd�j}|d |d fS )NT)ÚstrictÚrÚs)r   ÚloadÚnative)r   Údatar   r   r   r      s   r   c                 C   s   t jdtjdd� t| |ƒS )Nzqencode_rfc6979_signature is deprecated and will be removed in a future version, use encode_dss_signature instead.r   r	   )r   r   r   r   Úencode_dss_signature©r   r   r   r   r   Úencode_rfc6979_signature    s   ü
r   c                 C   s2   t | tjƒrt |tjƒstdƒ‚t| |dœƒ ¡ S )NzBoth r and s must be integersr   )Ú
isinstanceÚsixÚinteger_typesÚ
ValueErrorr   Údumpr   r   r   r   r   *   s   
ÿ
þr   c                   @   s   e Zd Zdd„ Ze d¡ZdS )Ú	Prehashedc                 C   s&   t |tjƒs
tdƒ‚|| _|j| _d S )Nz#Expected instance of HashAlgorithm.)r   r   ÚHashAlgorithmÚ	TypeErrorÚ
_algorithmÚdigest_sizeÚ_digest_size)ÚselfÚ	algorithmr   r   r   Ú__init__5   s   zPrehashed.__init__r&   N)Ú__name__Ú
__module__Ú__qualname__r)   r   Úread_only_propertyr%   r   r   r   r   r!   4   s    r!   )Ú
__future__r   r   r   r   Úasn1crypto.algosr   r   Úcryptographyr   Úcryptography.hazmat.primitivesr   r   r   r   r   Úobjectr!   r   r   r   r   Ú<module>   s   


