o
    ØÜg“	  ã                   @   sÖ   d dl Z d dlmZ G dd„ deƒZG dd„ deƒZG dd„ de jeƒZG d	d
„ d
e jeƒZG dd„ de jeƒZG dd„ de j	eƒZ	G dd„ deƒZ
G dd„ de
ƒZG dd„ deƒZdededee ddfd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__© r
   r
   úI/var/www/html/api-tag/env/lib/python3.10/site-packages/nacl/exceptions.pyr      ó    r   c                   @   r   )ÚBadSignatureErrorzD
    Raised when the signature was forged or otherwise corrupt.
    Nr   r
   r
   r
   r   r      r   r   c                   @   ó   e Zd ZdS )ÚRuntimeErrorN©r   r   r   r
   r
   r
   r   r   $   ó    r   c                   @   r   )ÚAssertionErrorNr   r
   r
   r
   r   r   (   r   r   c                   @   r   )Ú	TypeErrorNr   r
   r
   r
   r   r   ,   r   r   c                   @   r   )Ú
ValueErrorNr   r
   r
   r
   r   r   0   r   r   c                   @   r   )ÚInvalidkeyErrorNr   r
   r
   r
   r   r   4   r   r   c                   @   r   )ÚCryptPrefixErrorNr   r
   r
   r
   r   r   8   r   r   c                   @   r   )Ú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    r   ÚcondÚargsÚkwdsÚreturnc                 O   sB   d}|  dt¡}|rt| 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   r
   r
   r   ÚensureF   s   
r"   )ÚbuiltinsÚtypingr   Ú	Exceptionr   r   r   r   r   r   r   r   r   ÚboolÚobjectr"   r
   r
   r
   r   Ú<module>   s   "
