o
    _6d                     @   s  d Z ddlZeeZddlmZ ddlmZ ddl	m
Z
 ddlmZ g dZdd	 Ze
ed
Ze
ddgedk r:dnddddddZg dZe
eddgdZg de Ze
eedZeeZedd e
eedZg dZe
edZeeZed e
edZeZg dZe
eZ dd Z!dd  Z"e
e" Z#e
d!gZ$e
d"d!gd!d#Z%e%Z&e
d$gZ'd%d& Z(e
g d'e(d(Z)e
d)gd*d+Z*g d,Z+e
e+Z,e
e+d-g e+d-d.d/ Z-Z.dS )0zpasslib.apps    N)chain)hash)LazyCryptContext)sys_bits)
custom_app_contextdjango_contextldap_contextldap_nocrypt_contextmysql_contextmysql4_contextmysql3_contextphpass_contextphpbb3_contextpostgres_contextc                  C   s:   ddl m}  |  }g d}|D ]}|| qt|ddS )Nr   )list_crypt_handlers)ZbigcryptZcrypt16Z	cisco_pixZcisco_type7Zhtdigestmysql323Zoracle10ZlmhashZmsdccZmsdcc2ZnthashZ	plaintextldap_plaintextdjango_disabledZunix_disabledZunix_fallbacksha256_crypt)schemesdefault)Zpasslib.registryr   removedict)r   r   excludedname r   cC:\Users\jesus\OneDrive\Desktop\erpjis_fastapi\backend\jisbackend\Lib\site-packages\passlib/apps.py_load_master_config   s   r   )onloadZsha512_cryptr   @   i) i  )r   r   Zsha512_crypt__min_roundsZsha256_crypt__min_roundsZadmin__sha512_crypt__min_roundsZadmin__sha256_crypt__min_rounds)django_salted_sha1Zdjango_salted_md5Zdjango_des_crypthex_md5r   r    r!   )r   r   
deprecated)django_pbkdf2_sha256django_pbkdf2_sha1django_bcrypt)r   r"      django_bcrypt_sha256)r#   r$   Zdjango_argon2r%   r'   r   )r   r%   )Zldap_salted_sha512Zldap_salted_sha256Zldap_salted_sha1Zldap_salted_md5Z	ldap_sha1Zldap_md5r   c                  C   s   ddl m}  dd | D S )Nr   unix_crypt_schemesc                 s   s    | ]}d | V  qdS )Zldap_Nr   ).0r   r   r   r   	<genexpr>   s    z+_iter_ldap_crypt_schemes.<locals>.<genexpr>)passlib.utilsr)   r(   r   r   r   _iter_ldap_crypt_schemes   s   r-   c                   C   s   t tt S )z5helper which iterates over supported std ldap schemes)r   std_ldap_schemesr-   r   r   r   r   _iter_ldap_schemes   s   r/   r   Zmysql41)r"   Zpostgres_md5c                  K   s   t j rdnd| d< | S )z9helper to choose default alg based on bcrypt availabilitybcryptphpassr   )r   r0   Zhas_backend)kwdsr   r   r   _create_phpass_policy   s   r3   )r0   r1   Z
bsdi_crypt)r   r   r1   H)Zphpass__ident)Zldap_hex_sha1Zldap_hex_md5Zldap_des_cryptZroundup_plaintextZldap_pbkdf2_sha1i'  )r   r"   r   Z ldap_pbkdf2_sha1__default_rounds)/__doc__logging	getLogger__name__log	itertoolsr   Zpasslibr   Zpasslib.contextr   r,   r   __all__r   Zmaster_contextr   Z_django10_schemesZdjango10_contextZ_django14_schemesZdjango14_contextlistZ_django16_schemesinsertZdjango16_contextZ_django_110_schemesZdjango110_contextZ_django21_schemesr   Zdjango21_contextr   r.   r	   r-   r/   r   r   r   r
   r   r3   r   r   Z_std_roundup_schemesZroundup10_contextZroundup_contextZroundup15_contextr   r   r   r   <module>   s    
'
		





