
    7g	                     j   d dl Z d dlmZ  G d de          Z G d de          Z G d de j        e          Z G d	 d
e j        e          Z G d de j        e          Z G d de j	        e          Z	 G d de          Z
 G d de
          Z G d de          Zdededee         ddfdZdS )    N)Typec                       e Zd ZdZdS )CryptoErrorz4
    Base exception for all nacl related errors
    N__name__
__module____qualname____doc__     I/var/www/html/syslog/venv/lib/python3.11/site-packages/nacl/exceptions.pyr   r                 r   r   c                       e Zd ZdZdS )BadSignatureErrorzD
    Raised when the signature was forged or otherwise corrupt.
    Nr   r   r   r   r   r      r   r   r   c                       e Zd ZdS )RuntimeErrorNr   r   r	   r   r   r   r   r   $           Dr   r   c                       e Zd ZdS )AssertionErrorNr   r   r   r   r   r   (   r   r   r   c                       e Zd ZdS )	TypeErrorNr   r   r   r   r   r   ,   r   r   r   c                       e Zd ZdS )
ValueErrorNr   r   r   r   r   r   0   r   r   r   c                       e Zd ZdS )InvalidkeyErrorNr   r   r   r   r   r   4   r   r   r   c                       e Zd ZdS )CryptPrefixErrorNr   r   r   r   r   r   8   r   r   r   c                       e Zd ZdZdS )UnavailableErrorz
    is a subclass of :class:`~nacl.exceptions.RuntimeError`, raised when
    trying to call functions not available in a minimal build of
    libsodium.
    Nr   r   r   r   r    r    <   s          	Dr   r    condargskwdsreturnc                     d}|                     dt                    }|rGt          |                    t	          |                                d                                       | du rdS  || )a  
    Return if a condition is true, otherwise raise a caller-configurable
    :py:class:`Exception`
    :param bool cond: the condition to be checked
    :param sequence args: the arguments to be passed to the exception's
                          constructor
    The only accepted named parameter is `raising` used to configure the
    exception to be raised if `cond` is not `True`
    z8check_condition() got an unexpected keyword argument {0}raisingr   TN)popr   r   formatreprpopitem)r!   r"   r#   
_CHK_UNEXPr&   s        r   ensurer,   F   sq     LJhhy.11G D
))$t||~~a/@*A*ABBCCCt||
'4.r   )builtinstypingr   	Exceptionr   r   r   r   r   r   r   r   r    boolobjectr,   r   r   r   <module>r2      s  (           )          	 	 	 	 	8(+ 	 	 		 	 	 	 	X,k 	 	 		 	 	 	 	"K 	 	 		 	 	 	 	$k 	 	 		 	 	 	 	k 	 	 		 	 	 	 	 	 	 		 	 	 	 	| 	 	 	 f d9o $      r   