관리-도구
편집 파일: test_SHAKE.cpython-311.pyc
� O�Dgk � �� � d Z ddlZddlmZmZ ddlmZ ddlmZ ddl m Z mZ ddlm Z mZmZmZ G d� d ej � � Z G d � de� � Z G d� d e� � Z G d� dej � � Z eddddd� i� � pg Z ee� � D ]G\ ZZej dk r e d� � Zn eej � � Zeej fd�Z eedez e� � �H eddddd� i� � pg Z ee � � D ]G\ ZZej dk r e d� � Zn eej � � Zeej fd�Z eedez e� � �Hi fd�Z!e"dk rddlZd� Z# ej$ d �!� � dS dS )"z5Self-test suite for Crypto.Hash.SHAKE128 and SHAKE256� N)�hexlify� unhexlify)�load_test_vectors)�list_test_cases)�SHAKE128�SHAKE256)�b�bchr�bord�tobytesc �, � e Zd Zd� Zd� Zd� Zd� Zd� ZdS )� SHAKETestc � � | j � � � }| j � t d� � �� � }| j � � � � t d� � � � }| � |� d� � |� d� � � � |� d� � | � |� d� � |� d� � � � d S )N�90��data� )�shake�newr �update�assertNotEqual�read�assertEqual)�self�xof1�xof2�xof3s ��/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/SelfTest/Hash/test_SHAKE.py�test_new_positivezSHAKETest.test_new_positive, s� � ��z�~�~�����z�~�~�1�T�7�7�~�+�+���z�~�~���&�&�q��w�w�/�/�����D�I�I�b�M�M�4�9�9�R�=�=�9�9�9�� � �"� � � �������2���� � �"� � �6�6�6�6�6� c �� � t d� � dz t d� � dz g}| j � � � }|� |d � � � |d � � |� d� � }| j � � � }|� |d |d z � � | � |� d� � |� � d S )Nr �� � i, r � )r r r r r r )r �pieces�h�digests r �test_updatezSHAKETest.test_update6 s� � ��r�(�(�S�.�$�r�(�(�S�.�1���J�N�N���� ��������"�"�6�!�9�-�-�-���������J�N�N���� ������V�A�Y�&�'�'�'����������V�,�,�,�,�,r c �z � | j � � � }| � t |j d� � d S )N�string)r r �assertRaises� TypeErrorr )r r&