o
    j
                  	   @   s   d dl Z d dlZ d dlZeeZdd Zdddddd	Zg d
g d
g d
g d
dZdgdgdgdgdZ	da
eD ],Zz
e jee  W n	 eyP   Y q;w e jee durge	D ]	Ze	e e q]q;dd Zdd Zdd ZdS )    Nc                 C   s   t | |gd} t| |S )N)fromlist)
__import__getattr)modulename r   /root/aizidognhua/tmp/workspace/projects/ec89d86c-575f-41c9-af57-ac45cbdbf775/venv/lib/python3.10/site-packages/unicrypto/__init__.pyimport_from   s   
r	   mbedtlscryptography
CryptodomezCrypto.Cipher.Salsa20zCrypto.Random.OSRNG)r
   r   pyCryptodomexpyCryptodomepyCrypto)r   r   r   r   r
   pure)DESTDESAESRC4r   c                 C   s,   t d|| f  d| | f }t|| S )Nzsymmetric using "%s" for "%s"zunicrypto.backends.%s.%s)loggerdebuglowerr	   )
ciphernamecryptolibname
moduleNamer   r   r   get_cipher_by_name1   s   
r   c                 C   s   t d u r9| tvrtd|  ttt|  tt|  }d }t|  D ]
}||v r-|} nq#|d u r8td|  nt }t| |S )NzCipher "%s" is not supported!z.Could not find any modules to load cipher "%s")override_library	preftable	Exceptionlistsetintersectionavailable_modulesr   )r   possible_prefmoduleselected_moduler   r   r   r   get_preferred_cipher7   s   
r%   c                 C   s   | a d S )N)r   )libnamer   r   r   use_libraryL   s   r'   )	importlibimportlib.utillogging	getLogger__name__r   r	   pref_to_moduler   r"   r   prefnameutil	find_specModuleNotFoundErrorkappendr   r%   r'   r   r   r   r   <module>   sF    
