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` girddlmZmZmZmZddlmZddlmZddl m Z m Z ddl m Z ddlmZmZmZgdZeZed k(rd d lmZmZmZmZmZd Zd e_dZyddlmZddlmZy))unicode_literalsdivisionabsolute_importprint_function)backend)pretty_message)buffer_from_bytesbytes_from_buffer) pkcs12_kdf) type_namebyte_cls int_types)pbkdf2r rand_byteswin)bcrypt BcryptConst handle_erroropen_alg_handleclose_alg_handlec t|tsttdt |t|tsttdt |t|t sttdt ||dkr t dt|t sttdt ||dkr t d|tgdvrt td t|tjtjtjtjd|}d } t|tj}t!|}t#j$||t'||t'||||d }t)|t+||r t-|SS#|r t-|wwxYw) a% PBKDF2 from PKCS#5 :param hash_algorithm: The string name of the hash algorithm to use: "sha1", "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 OSError - when an error is returned by the OS crypto library :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 rz!iterations must be greater than 0zG key_length must be an integer, not %s z!key_length must be greater than 0)sha1sha256sha384sha512z| hash_algorithm must be one of "sha1", "sha256", "sha384", "sha512", not %s Nr) isinstancer TypeErrorr r r ValueErrorsetreprrBCRYPT_SHA1_ALGORITHMBCRYPT_SHA256_ALGORITHMBCRYPT_SHA384_ALGORITHMBCRYPT_SHA512_ALGORITHMrBCRYPT_ALG_HANDLE_HMAC_FLAGr rBCryptDeriveKeyPBKDF2lenrr r) hash_algorithmpasswordsalt iterations key_length alg_constant alg_handle output_bufferress C/opt/nydus/tmp/pip-target-bkdi07qp/lib/python/oscrypto/_win/util.pyrrs8(H-N(#  $)N$  *i0N*%   >@A A*i0N*%   >@A A %K!L L^^$   55!99!99!99      -({7^7^_J-j9M..H D  C  $]3 ,z ,s A)GGFct|tsttdt ||dkr t d|dkDr t dd} t tj}t|}tj|||d}t|t||r t|SS#|r t|wwxYw)a Returns a number of random bytes suitable for cryptographic purposes :param length: The desired number of bytes :raises: ValueError - when any of the parameters contain an invalid value TypeError - when any of the parameters are of the wrong type OSError - when an error is returned by the OS crypto library :return: A byte string zC length must be an integer, not %s rzlength must be greater than 0iz$length must not be greater than 1024Nr)rrrr r r rrBCRYPT_RNG_ALGORITHMr rBCryptGenRandomrr r)lengthr0bufferr2s r3rrs &),N&!   A:<= = D=CD D  -()I)IJJ&v.F((VVQGC  $V, ,z ,s AB22C)r)rN) __future__rrrrr_errorsr _ffir r _pkcs12r _typesr rr__all___backend_cngrrrrrr pure_pythonr_pkcs5_randr3rGs\RR$7 33  9 uZZh-TF+-^ "rF