/var/opt/nydus/ops/oscrypto/_win/__pycache__
NameSizeModeActions
asymmetric.cpython-312.pyc1130060644editdlrm
symmetric.cpython-312.pyc316970644editdlrm
tls.cpython-312.pyc605400644editdlrm
trust_list.cpython-312.pyc72730644editdlrm
util.cpython-312.pyc55630644editdlrm
_advapi32.cpython-312.pyc46860644editdlrm
_advapi32_cffi.cpython-312.pyc52410644editdlrm
_advapi32_ctypes.cpython-312.pyc88840644editdlrm
_cng.cpython-312.pyc53350644editdlrm
_cng_cffi.cpython-312.pyc49130644editdlrm
_cng_ctypes.cpython-312.pyc64920644editdlrm
_crypt32.cpython-312.pyc24450644editdlrm
_crypt32_cffi.cpython-312.pyc66620644editdlrm
_crypt32_ctypes.cpython-312.pyc97610644editdlrm
_decode.cpython-312.pyc11610644editdlrm
_kernel32.cpython-312.pyc11310644editdlrm
_kernel32_cffi.cpython-312.pyc15700644editdlrm
_kernel32_ctypes.cpython-312.pyc20730644editdlrm
_secur32.cpython-312.pyc44520644editdlrm
_secur32_cffi.cpython-312.pyc47090644editdlrm
_secur32_ctypes.cpython-312.pyc62490644editdlrm
__init__.cpython-312.pyc1680644editdlrm
Edit: /var/opt/nydus/ops/oscrypto/_win/__pycache__/util.cpython-312.pyc (5563B)
N jrddlmZmZmZmZddlmZddlmZddl 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-a90h98xg/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