ok
Direktori : /opt/imunify360/venv/lib/python3.11/site-packages/Crypto/Hash/__pycache__/ |
Current File : //opt/imunify360/venv/lib/python3.11/site-packages/Crypto/Hash/__pycache__/Poly1305.cpython-311.pyc |
� f��f� � � � d dl mZ d dlmZmZmZ d dlmZ d dlm Z d dl mZmZm Z mZmZmZmZ edd� � Z G d� d e� � Zd � ZdS )� )� unhexlify)�bord�tobytes�_copy_bytes)�BLAKE2s)�get_random_bytes)�load_pycryptodome_raw_lib�VoidPointer�SmartPointer�create_string_buffer�get_raw_buffer�c_size_t�c_uint8_ptrzCrypto.Hash._poly1305a� int poly1305_init(void **state, const uint8_t *r, size_t r_len, const uint8_t *s, size_t s_len); int poly1305_destroy(void *state); int poly1305_update(void *state, const uint8_t *in, size_t len); int poly1305_digest(const void *state, uint8_t *digest, size_t len); c �@ � e Zd ZdZdZd� Zd� Zd� Zd� Zd� Z d� Z d � Zd S )�Poly1305_MACz�An Poly1305 MAC object. Do not instantiate directly. Use the :func:`new` function. :ivar digest_size: the size in bytes of the resulting MAC tag :vartype digest_size: integer � c �p � t |� � dk rt d� � �t |� � dk rt d� � �d | _ t � � }t � |� � � t |� � t t |� � � � t |� � t t |� � � � � � }|rt d|z � � �t |� � � t j � � | _ |r| � |� � d S d S )Nr z Parameter r is not 16 bytes longz Parameter s is not 16 bytes longz%Error %d while instantiating Poly1305)�len� ValueError�_mac_tagr � _raw_poly1305� poly1305_init� address_ofr r r �get�poly1305_destroy�_state�update)�self�r�s�data�state�results �v/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Hash/Poly1305.py�__init__zPoly1305_MAC.__init__? s � ��q�6�6�R�<�<��?�@�@�@��q�6�6�R�<�<��?�@�@�@��� �� � ���,�,�U�-=�-=�-?�-?�-8��^�^�-5�c�!�f�f�-=�-=�-8��^�^�-5�c�!�f�f�-=�-=� /� /�� � O��D�v�M�N�N�N�"�5�9�9�;�;�#0�#A�C� C���� ��K�K������� � � c � � | j rt d� � �t � | j � � � t |� � t t |� � � � � � }|rt d|z � � �| S )z�Authenticate the next chunk of message. Args: data (byte string/byte array/memoryview): The next chunk of data z8You can only call 'digest' or 'hexdigest' on this objectz$Error %d while hashing Poly1305 data) r � TypeErrorr �poly1305_updater r r r r r )r r! r# s r$ r zPoly1305_MAC.updateV s� � � �=� X��V�W�W�W��.�.�t�{���/@�/@�/:�4�/@�/@�/7��D� � �/B�/B�D� D�� � N��C�f�L�M�M�M��r&