o
    5h                     @   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)bigcryptcrypt16	cisco_pixcisco_type7htdigestmysql323oracle10lmhashmsdccmsdcc2nthash	plaintextldap_plaintextdjango_disabledunix_disabledunix_fallbacksha256_crypt)schemesdefault)passlib.registryr   removedict)r   r"   excludedname r)   `/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/passlib/apps.py_load_master_config   s   r+   )onloadsha512_cryptr!   @   i) i  )r"   r#   sha512_crypt__min_roundssha256_crypt__min_roundsadmin__sha512_crypt__min_roundsadmin__sha256_crypt__min_rounds)django_salted_sha1django_salted_md5django_des_crypthex_md5r   r3   r6   )r"   r#   
deprecated)django_pbkdf2_sha256django_pbkdf2_sha1django_bcrypt)r"   r7      django_bcrypt_sha256)r8   r9   django_argon2r:   r<   r   )r"   r:   )ldap_salted_sha512ldap_salted_sha256ldap_salted_sha1ldap_salted_md5	ldap_sha1ldap_md5r   c                  C   s   ddl m}  dd | D S )Nr   unix_crypt_schemesc                 s   s    | ]}d | V  qdS )ldap_Nr)   ).0r(   r)   r)   r*   	<genexpr>   s    z+_iter_ldap_crypt_schemes.<locals>.<genexpr>)passlib.utilsrE   rD   r)   r)   r*   _iter_ldap_crypt_schemes   s   rJ   c                   C   s   t tt S )z5helper which iterates over supported std ldap schemes)r   std_ldap_schemesrJ   r)   r)   r)   r*   _iter_ldap_schemes   s   rL   r   mysql41)r7   postgres_md5c                  K   s   t j rdnd| d< | S )z9helper to choose default alg based on bcrypt availabilitybcryptphpassr#   )r   rO   has_backend)kwdsr)   r)   r*   _create_phpass_policy   s   rS   )rO   rP   
bsdi_crypt)r"   r,   rP   H)phpass__ident)ldap_hex_sha1ldap_hex_md5ldap_des_cryptroundup_plaintextldap_pbkdf2_sha1i'  )r"   r7   r#    ldap_pbkdf2_sha1__default_rounds)/__doc__logging	getLogger__name__log	itertoolsr   passlibr   passlib.contextr   rI   r   __all__r+   master_contextr   _django10_schemesdjango10_context_django14_schemesdjango14_contextlist_django16_schemesinsertdjango16_context_django_110_schemesdjango110_context_django21_schemesr%   django21_contextr   rK   r	   rJ   rL   r   r   r   r
   r   rS   r   r   _std_roundup_schemesroundup10_contextroundup_contextroundup15_contextr)   r)   r)   r*   <module>   s    
'
		





