관리-도구
편집 파일: test_EAX.cpython-311.pyc
� O�Dg�p � �N � d dl Z d dlmZ d dlmZ d dlmZ d dlmZm Z d dl mZmZ d dl mZ d dlmZ d � Z G d � de j � � Z G d� d e j � � Z G d� de j � � Z G d� de j � � Z G d� de j � � Zd dl mZmZmZmZmZ e� d eej � � z eej � � ej D ]%Ze� d ee� � z ee� � �&ej D ]%Ze� d ee� � z ee� � �&ej D ]%Ze� d ee� � z ee� � �&ej D ]%Ze� d ee� � z ee� � �&i fd�Z e!dk rd� Z" e j# d�� � dS dS )� N�� unhexlify)�list_test_cases)�load_test_vectors_wycheproof)�tobytes�bchr)�AES�DES3)�SHAKE128)�strxorc �l � t j t | � � �� � � |� � S )N)�data)r �newr �read)�tag�lengths ��/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/SelfTest/Cipher/test_EAX.py�get_tag_randomr + s) � ��<�W�S�\�\�*�*�*�/�/��7�7�7� c �� � e Zd Z edd� � Z edd� � Z edd� � Z edd� � Zd� Zd� Z d � Z d � Zd� Zd� Z d � Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� ZdS )�EaxTests�key_128� �key_192� nonce_128� �data_128c �R � t j | j t j | j �� � }t dd� � }|� |� � }t j | j t j | j �� � }|� |� � }| � ||� � d S )N��nonce� plaintexti@ ) r r r �MODE_EAX�nonce_96r �encrypt�decrypt�assertEqual��self�cipher�pt�ct�pt2s r �test_loopback_128zEaxTests.test_loopback_1286 s� � �����s�|�4�=�I�I�I�� �K�� 2� 2�� �^�^�B� � ������s�|�4�=�I�I�I���n�n�R� � ������S�!�!�!�!�!r c �R � t j | j t j | j �� � }t dd� � }|� |� � }t j | j t j | j �� � }|� |� � }| � ||� � d S )Nr r! i ) r r r r"