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` gi ddlmZmZmZmZddlZddlZddlZddlm Z m Z ddl m Z ddl mZmZmZej"dkreZndZd gZd Zy) )unicode_literalsdivisionabsolute_importprint_functionN)int_from_bytes int_to_bytes)pretty_message) type_namebyte_cls int_types)ct|gS)N)bytes)nums A/opt/nydus/tmp/pip-target-bkdi07qp/lib/python/oscrypto/_pkcs12.pychr_clsrscU| pkcs12_kdfc t|tsttdt |t|tsttdt |t|t sttdt ||dkrt tdt|t|t sttdt ||dkrt tdt||tgdvrt td t||tgd vrt td t||jd jd dz}tt|}ddddddd|}|dvrd} nd} t|| z} d} |dk7r]| ttj t#t%|| z z} t%| | kr| |z } t%| | kr| d| } d} |dk7r]| ttj t#t%|| z z}t%| |kr| |z } t%| |kr| d|} | | z}ttj t#||z }d||zz}t'd|dzD]}|| |zj)}t'd|dzD]}||j)}||krd}t%|| kr||z }t%|| krt+|d| dz}t'dt%|| zD]Q}|| z}|dz| z}|||}t-t+||z}t%|}|| kDr||| z d}|d||z||dz}S|dz |z}t/||}|d||d|z|||zdz}|d|S)a 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 :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 rzC 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 )md5sha1sha224sha256sha384sha512z hash_algorithm must be one of "md5", "sha1", "sha224", "sha256", "sha384", "sha512", not %s )rrz< id_ must be one of 1, 2, 3, not %s zutf-8zutf-16bes 0@)rrrrrN) isinstancer TypeErrorr r r ValueErrorreprsetdecodeencodegetattrhashlibrintmathceilfloatlenrangedigestrr min)hash_algorithmpasswordsalt iterations key_lengthid_utf16_passwordalgouvdss_lenpp_lenicara2_bnum2startendi_num2i_num2_lbeginto_copys rrrsl6 h )  h      dH %  dO     j) ,  j !    A~        j) ,  j !    A~       S!XYY       #i.   I    __W-44Z@;NN 7N +D   A--    qA A s{C %D "2Q"6788!fun IA!fun aJ AC %N(;"r\sLRR  /#22dG   lr