관리-도구
편집 파일: test_Blowfish.cpython-311.pyc
� O�Dg> � �� � d Z ddlZddlmZ ddlmZ g d�Z G d� dej � � Z G d� d ej � � Z i fd �Z edk rddlZd� Z ej d �� � dS dS )z*Self-test suite for Crypto.Cipher.Blowfish� N)�bchr)�Blowfish)7��0000000000000000�4ef997456198dd78r )�ffffffffffffffff�51866fd5b85ecb8ar )�1000000000000001�7d856f9a613063f2�3000000000000000)�1111111111111111�2466dd878b963c9dr )r �61f9c3802281b096�0123456789abcdef)r �7d0cc630afda1ec7r r )r �0aceab0fc6a0a28d�fedcba9876543210)�01a1d6d039776742�59c68245eb05282b�7ca110454a1a6e57)�5cd54ca83def57da�b1b8cc0b250f09a0�0131d9619dc1376e)�0248d43806f67172�1730e5778bea1da4�07a1133e4a0b2686)�51454b582ddf440a�a25e7856cf2651eb�3849674c2602319e)�42fd443059577fa2�353882b109ce8f1a�04b915ba43feb5b6)�059b5e0851cf143a�48f4d0884c379918�0113b970fd34f2ce)�0756d8e0774761d2�432193b78951fc98�0170f175468fb5e6)�762514b829bf486a�13f04154d69d1ae5�43297fad38e373fe)�3bdd119049372802�2eedda93ffd39c79�07a7137045da2a16)�26955f6835af609a�d887e0393c2da6e3�04689104c2fd3b2f)�164d5e404f275232�5f99d04f5b163969�37d06bb516cb7546)�6b056e18759f5cca�4a057a3b24d3977b�1f08260d1ac2465e)�004bd6ef09176062�452031c1e4fada8e�584023641aba6176)�480d39006ee762f2�7555ae39f59b87bd�025816164629b007)�437540c8698f3cfa�53c55f9cb49fc019�49793ebc79b3258f)�072d43a077075292�7a8e7bfa937e89a3�4fb05e1515ab73a7)�02fe55778117f12a�cf9c5d7a4986adb5�49e95d6d4ca229bf)�1d9d5c5018f728c2�d1abb290658bc778�018310dc409b26d6)�305532286d6f295a�55cb3774d13ef201�1c587f1c13924fef)r �fa34ec4847b268b2�0101010101010101)r �a790795108ea3cae�1f1f1f1f0e0e0e0e)r �c39e072d9fac631d�e0fee0fef1fef1fe)r �014933e0cdaff6e4r )r �f21e9a77b71c49bcr )r �245946885754369ar )r �6b5c5a9c5d9e0a5ar )r �be1e639408640f05�f0e1d2c3)r �b39e44481bdb1e6e� f0e1d2c3b4)r �9457aa83b1928c0d�f0e1d2c3b4a5)r �8bb77032f960629d�f0e1d2c3b4a596)r �e87a244e2cc85e82�f0e1d2c3b4a59687)r �15750e7a4f4ec577�f0e1d2c3b4a5968778)r �122ba70b3ab64ae0�f0e1d2c3b4a596877869)r �3a833c9affc537f6�f0e1d2c3b4a5968778695a)r �9409da87a90f6bf2�f0e1d2c3b4a5968778695a4b)r �884f80625060b8b4�f0e1d2c3b4a5968778695a4b3c)r �1f85031c19e11968�f0e1d2c3b4a5968778695a4b3c2d)r �79d9373a714ca34f�f0e1d2c3b4a5968778695a4b3c2d1e)r �93142887ee3be15c� f0e1d2c3b4a5968778695a4b3c2d1e0f)r �03429e838ce2d14b�"f0e1d2c3b4a5968778695a4b3c2d1e0f00)r �a4299e27469ff67b�$f0e1d2c3b4a5968778695a4b3c2d1e0f0011)r �afd5aed1c1bc96a8�&f0e1d2c3b4a5968778695a4b3c2d1e0f001122)r �10851c0e3858da9f�(f0e1d2c3b4a5968778695a4b3c2d1e0f00112233)r �e6f51ed79b9db21f�*f0e1d2c3b4a5968778695a4b3c2d1e0f0011223344)r �64a6e14afd36b46f�,f0e1d2c3b4a5968778695a4b3c2d1e0f001122334455)r �80c7d7d45a5479ad�.f0e1d2c3b4a5968778695a4b3c2d1e0f00112233445566)r �05044b62fa52d080�0f0e1d2c3b4a5968778695a4b3c2d1e0f0011223344556677c � � e Zd Zd� ZdS )� KeyLengthc � � | � t t j t d� � dz t j � � | � t t j t d� � dz t j � � d S )Nr � �9 )�assertRaises� ValueErrorr �newr �MODE_ECB)�selfs ��/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/SelfTest/Cipher/test_Blowfish.py�runTestzKeyLength.runTestl sl � ����*�h�l�D��G�G�a�K�"�+� -� -� -����*�h�l�D��G�G�b�L�"�+� -� -� -� -� -� N��__name__� __module__�__qualname__r� � r� r� r� r� j s# � � � � � �-� -� -� -� -r� r� c � � e Zd Zd� ZdS )� TestOutputc � � t j dt j � � }d}|� |� � }t d� � }|� ||�� � }| � ||� � | � |d � � |� ||�� � }| � ||� � | � |d � � t t d� � � � }|� ||�� � | � ||� � |� ||�� � | � ||� � | � t |j |d�� � | � t |j |d�� � t d� � }| � t |j ||�� � | � t |j ||�� � d S )Ns 4444444444444444s 5555555555555555� )�outputs 0000000000000000� )r r� r� �encrypt� bytearray�assertEqual�decrypt� memoryviewr� � TypeErrorr� )r� �cipher�pt�ctr� �res�shorter_outputs r� r� zTestOutput.runTestu s� � � ��g�x�'8�9�9�� �� �^�^�B� � ���2�����n�n�R��n�/�/������V�$�$�$�����d�#�#�#��n�n�R��n�/�/������V�$�$�$�����d�#�#�#��I�b�M�M�*�*�����r�&��)�)�)�����V�$�$�$����r�&��)�)�)�����V�$�$�$����)�V�^�R���H�H�H����)�V�^�R���H�H�H�"�1�������*�f�n�b���P�P�P����*�f�n�b���P�P�P�P�Pr� Nr� r� r� r� r� r� s s( � � � � � �Q� Q� Q� Q� Qr� r� c � � ddl m} |t dt � � }|� t � � � � |t � � gz }|S )N� )�make_block_testsr )�commonr� r � test_data�appendr� r� )�configr� �testss r� � get_testsr� � sS � �(�(�(�(�(�(���X�z�9�=�=�E� �L�L������� �j�l�l�^��E��Lr� �__main__c �B � t j t � � � � S )N)�unittest� TestSuiter� r� r� r� �<lambda>r� � s � �H�&�y�{�{�3�3� r� �suite)�defaultTest)�__doc__r� �Crypto.Util.py3compatr � Crypto.Cipherr r� �TestCaser� r� r� r� r� �mainr� r� r� �<module>r� s ��2 1� 0� ���� &� &� &� &� &� &� "� "� "� "� "� "�E � E � E � �P-� -� -� -� -��!� -� -� -�Q� Q� Q� Q� Q��"� Q� Q� Q�D � � � � � �z����O�O�O�3�3�E��H�M�g�&�&�&�&�&�&� �r�