/var/opt/nydus/ops/oscrypto/_openssl/__pycache__
NameSizeModeActions
asymmetric.cpython-312.pyc645230644editdlrm
symmetric.cpython-312.pyc245190644editdlrm
tls.cpython-312.pyc438400644editdlrm
util.cpython-312.pyc72310644editdlrm
_libcrypto.cpython-312.pyc42660644editdlrm
_libcrypto_cffi.cpython-312.pyc107840644editdlrm
_libcrypto_ctypes.cpython-312.pyc173990644editdlrm
_libssl.cpython-312.pyc26740644editdlrm
_libssl_cffi.cpython-312.pyc34730644editdlrm
_libssl_ctypes.cpython-312.pyc68790644editdlrm
__init__.cpython-312.pyc1720644editdlrm
Edit: /var/opt/nydus/ops/oscrypto/_openssl/__pycache__/util.cpython-312.pyc (7231B)
N jddlmZmZmZmZddlmZddlmZm 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-a90h98xg/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