PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB` giddlmZmZmZmZddlmZddlmZm Z ddl m Z m Z m Z ddlmZddlmZmZmZgd Ze d kr dd lmZdZyd Zd e_dZy))unicode_literalsdivisionabsolute_importprint_function)pretty_message)buffer_from_bytesbytes_from_buffer) libcryptolibcrypto_version_infohandle_openssl_error) rand_bytes) type_namebyte_cls int_types)pbkdf2 pkcs12_kdfr)r )rc Vt|tsttdt |t|tsttdt |t|t sttdt ||dkr t dt|t sttdt ||dkr t d|tgdvrt td t| tjtjtjtjtjd|}t|}tj |t#||t#|||||}t%|t'|S) a PBKDF2 from PKCS#5 :param hash_algorithm: The string name of the hash algorithm to use: "sha1", "sha224", "sha256", "sha384", "sha512" :param password: A byte string of the password to use an input to the KDF :param salt: A cryptographic random byte string :param iterations: The numbers of iterations to use when deriving the key :param key_length: The length of the desired key in bytes :raises: ValueError - when any of the parameters contain an invalid value TypeError - when any of the parameters are of the wrong type :return: The derived key as a byte string zH password must be a byte string, not %s zD salt must be a byte string, not %s zG iterations must be an integer, not %s r z!iterations must be greater than 0zG key_length must be an integer, not %s z!key_length must be greater than 0)sha1sha224sha256sha384sha512z hash_algorithm must be one of "sha1", "sha224", "sha256", "sha384", "sha512", not %s ) isinstancer TypeErrorrrr ValueErrorsetreprr EVP_sha1 EVP_sha224 EVP_sha256 EVP_sha384 EVP_sha512r PKCS5_PBKDF2_HMAClenrr )hash_algorithmpasswordsalt iterations key_lengthevp_md output_bufferresults G/opt/nydus/tmp/pip-target-bkdi07qp/lib/python/oscrypto/_openssl/util.pyrrs6(H-N(#  $)N$  *i0N*%   >@A A*i0N*%   >@A A %U!V V^^$  &&********   **5 ,,  M  I       V$ //Fc bt|tsttdt |t|tsttdt |t|t sttdt ||dkrt tdt|t|t sttdt ||dkrt tdt||tgdvrt td t||tgd vrt td t||jd jd dz} tjtjtjtjtj tj"d|}t%|}tj&|t)||t)|||||| } t+| t-|S)a0 KDF from RFC7292 appendix B.2 - https://tools.ietf.org/html/rfc7292#page-19 :param hash_algorithm: The string name of the hash algorithm to use: "md5", "sha1", "sha224", "sha256", "sha384", "sha512" :param password: A byte string of the password to use an input to the KDF :param salt: A cryptographic random byte string :param iterations: The numbers of iterations to use when deriving the key :param key_length: The length of the desired key in bytes :param id_: The ID of the usage - 1 for key, 2 for iv, 3 for mac :raises: ValueError - when any of the parameters contain an invalid value TypeError - when any of the parameters are of the wrong type :return: The derived key as a byte string z@ password must be a byte string, not %s z< salt must be a byte string, not %s z? iterations must be an integer, not %s r zC iterations must be greater than 0 - is %s z? key_length must be an integer, not %s zC key_length must be greater than 0 - is %s )md5rrrrrz hash_algorithm must be one of "md5", "sha1", "sha224", "sha256", "sha384", "sha512", not %s )r rz< id_ must be one of 1, 2, 3, not %s zutf-8zutf-16bes)rrrrrrrrrdecodeencoder EVP_md5r r!r"r#r$r PKCS12_key_gen_unir&rr ) r'r(r)r*r+id_utf16_password digest_typer-r.s r/rr{s>< h )  h      dH %  dO     j) ,  j !    A~        j) ,  j !    A~       S!XYY       #i.   I    __W-44Z@;NN  ""&&&&&&&& K&j1M  ) ) N  D   F ] ++r0N) __future__rrrr_errorsr_ffir r _libcryptor r r_randr_typesrrr__all___pkcs5r pure_pythonrr0r/rEsSRR$7OO33 D Nx,I_0BFx,r0