o
    	h	                     @   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
   Q/var/www/html/optinet_system/venv/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   "
