a fWc@sdZddlZeeZddlmZddlmZddl m Z ddl m Z gdZ dd Ze ed Ze d d ge d krtd nd dddddZgdZe eddgdZgdeZe eedZeeZedde eedZgdZe edZeeZede edZeZgdZe eZ ddZ!dd Z"e e"Z#e d!gZ$e d"d!gd!d#Z%e%Z&e d$gZ'd%d&Z(e gd'e(d(Z)e d)gd*d+Z*gd,Z+e e+Z,e e+d-ge+d-d.d/Z-Z.dS)0z passlib.appsN)chain)hash)LazyCryptContext)sys_bits) custom_app_contextdjango_context ldap_contextldap_nocrypt_context mysql_contextmysql4_contextmysql3_contextphpass_contextphpbb3_contextpostgres_contextcCs:ddlm}|}gd}|D]}||qt|ddS)Nr)list_crypt_handlers)ZbigcryptZcrypt16Z cisco_pixZ cisco_type7Zhtdigestmysql323Zoracle10ZlmhashZmsdccZmsdcc2ZnthashZ plaintextldap_plaintextdjango_disabledZ unix_disabledZ unix_fallback sha256_crypt)schemesdefault)Zpasslib.registryrremovedict)rrZexcludednamer0/usr/lib/python3.9/site-packages/passlib/apps.py_load_master_configs   r)onloadZ sha512_cryptr@i)i)rrZsha512_crypt__min_roundsZsha256_crypt__min_roundsZadmin__sha512_crypt__min_roundsZadmin__sha256_crypt__min_rounds)django_salted_sha1Zdjango_salted_md5Zdjango_des_crypthex_md5rrr )rr deprecated)django_pbkdf2_sha256django_pbkdf2_sha1 django_bcrypt)rr!django_bcrypt_sha256)r"r#Z django_argon2r$r&r)rr$)Zldap_salted_sha512Zldap_salted_sha256Zldap_salted_sha1Zldap_salted_md5Z ldap_sha1Zldap_md5rcCsddlm}dd|DS)Nrunix_crypt_schemescss|]}d|VqdS)Zldap_Nr).0rrrr z+_iter_ldap_crypt_schemes..) passlib.utilsr(r'rrr_iter_ldap_crypt_schemess r-cCs tttS)z5helper which iterates over supported std ldap schemes)rstd_ldap_schemesr-rrrr_iter_ldap_schemessr/rZmysql41)r!Z postgres_md5cKstjrdnd|d<|S)z9helper to choose default alg based on bcrypt availabilitybcryptphpassr)rr0Z has_backend)kwdsrrr_create_phpass_policysr3)r0r1Z bsdi_crypt)rrr1H)Z phpass__ident)Z ldap_hex_sha1Z ldap_hex_md5Zldap_des_cryptZroundup_plaintextZldap_pbkdf2_sha1i')rr!rZ ldap_pbkdf2_sha1__default_rounds)/__doc__ZloggingZ getLogger__name__log itertoolsrZpasslibrZpasslib.contextrr,r__all__rZmaster_contextrZ_django10_schemesZdjango10_contextZ_django14_schemesZdjango14_contextlistZ_django16_schemesinsertZdjango16_contextZ_django_110_schemesZdjango110_contextZ_django21_schemesrZdjango21_contextrr.r r-r/rr r r rr3r rZ_std_roundup_schemesZroundup10_contextZroundup_contextZroundup15_contextrrrrs     '