/var/opt/nydus/ops/oscrypto/__pycache__
NameSizeModeActions
asymmetric.cpython-312.pyc117610644editdlrm
errors.cpython-312.pyc34960644editdlrm
kdf.cpython-312.pyc83310644editdlrm
keys.cpython-312.pyc7080644editdlrm
symmetric.cpython-312.pyc10880644editdlrm
tls.cpython-312.pyc6220644editdlrm
trust_list.cpython-312.pyc134620644editdlrm
util.cpython-312.pyc19390644editdlrm
version.cpython-312.pyc3650644editdlrm
_asn1.cpython-312.pyc21380644editdlrm
_asymmetric.cpython-312.pyc320300644editdlrm
_cipher_suites.cpython-312.pyc222960644editdlrm
_ecdsa.cpython-312.pyc222560644editdlrm
_errors.cpython-312.pyc12870644editdlrm
_ffi.cpython-312.pyc170820644editdlrm
_int.cpython-312.pyc9780644editdlrm
_pkcs1.cpython-312.pyc210960644editdlrm
_pkcs5.cpython-312.pyc41870644editdlrm
_pkcs12.cpython-312.pyc57770644editdlrm
_rand.cpython-312.pyc14390644editdlrm
_tls.cpython-312.pyc173070644editdlrm
_types.cpython-312.pyc14140644editdlrm
__init__.cpython-312.pyc99950644editdlrm
Edit: /var/opt/nydus/ops/oscrypto/__pycache__/_pkcs12.cpython-312.pyc (5777B)
N j 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-a90h98xg/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 rrrs]6 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