관리-도구
편집 파일: test_BLAKE2.cpython-311.pyc
� O�Dg�? � �, � d dl Z d dlZd dlZd dlZd dlmZmZ d dlmZ d dl m Z d dlmZ d dl mZmZ G d� dej � � Z G d � d e� � Z G d� de� � Z G d � dej � � Z G d� de� � Z G d� de� � Z G d� dej � � Z G d� de� � Z G d� de� � Z G d� dej � � Z G d� de� � Z G d� de� � Zi fd�Zed k rd dlZd!� Z ej d"�#� � dS dS )$� N)� unhexlify�hexlify)�tobytes)�strxor_c)�list_test_cases)�BLAKE2b�BLAKE2sc �\ � e Zd Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z d � Zd � Zd� Z d� Zd � ZdS )� Blake2Testc �� � | j � | j �� � }| j j |j fD �]}t d| j dz d� � D ],} ||�� � }| � |j |dz � � �-t d| j dz � � D ])} ||�� � }| � |j |� � �* |d| j �� � � � � } || j �� � � d� � � � � }| � ||� � |dd| j � � � ��|� � � }| � |j | j � � d S ) N��digest_bits� � ��digest_bytes� �)�datar � A� 5)r �keyr ) �BLAKE2�new�max_bits�range�assertEqual�digest_size� max_bytes�digest�update)�self�h�new_func�dbits�hobj�dbytes�digest1�digest2s ��/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/SelfTest/Hash/test_BLAKE2.py�test_new_positivezBlake2Test.test_new_positive. s� � ��K�O�O�� �O�6�6�������.� G� G�H��q�$�-�!�"3�Q�7�7� ?� ?���x�E�2�2�2��� � ��!1�5�A�:�>�>�>�>���4�>�A�#5�6�6� ;� ;���x�V�4�4�4��� � ��!1�6�:�:�:�:��h�G�$�.�I�I�I�P�P�R�R�G��h�D�N�;�;�;�B�B�7�K�K�R�R�T�T�G����W�g�.�.�.��H�$�D�t�~�F�F�F�F�F��u�u�w�w������)�4�>�:�:�:�:�:� c � � | j � | j �� � }| j j |j fD �]}| � t || j | j �� � | � t |d�� � | � t || j dz �� � | � t |d�� � | � t |d�� � | � t || j dz �� � | � t || j d� � � | � t || j d� � � ��d S )Nr )r r r r r � � �string�r r )r r )r r r �assertRaises� TypeErrorr � ValueError)r! r"