Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/Cryptodome/Hash/__pycache__/SHA3_384.cpython-39.pyc
Ðазад
a b�h� � @ s^ d dl mZ d dlmZmZmZmZmZmZm Z d dl mZ G dd� de�Z dd� Ze jZdS ) � ��bord)�load_pycryptodome_raw_lib�VoidPointer�SmartPointer�create_string_buffer�get_raw_buffer�c_size_t�c_uint8_ptr)�_raw_keccak_libc @ s@ e Zd ZdZdZdZdd� Zdd� Zdd � Zd d� Z dd � Z dS )� SHA3_384_Hashz�A SHA3-384 hash object. Do not instantiate directly. Use the :func:`new` function. :ivar oid: ASN.1 Object ID :vartype oid: string :ivar digest_size: the size in bytes of the resulting hash :vartype digest_size: integer �0 z2.16.840.1.101.3.4.2.9c C sb || _ d| _t� }t�|�� t| jd �d�}|r>td| ��t |� � tj�| _|r^| � |� d S )NF� � �&Error %d while instantiating SHA-3/384)�_update_after_digest�_digest_doner r Zkeccak_initZ address_ofr �digest_size� ValueErrorr �getZkeccak_destroy�_state�update)�self�data�update_after_digest�state�result� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/Cryptodome/Hash/SHA3_384.py�__init__1 s ���zSHA3_384_Hash.__init__c C sH | j r| jstd��t�| j�� t|�tt |���}|rDt d| ��| S )z�Continue hashing of a message by consuming the next chunk of data. Args: data (byte string/byte array/memoryview): The next chunk of the message being hashed. z8You can only call 'digest' or 'hexdigest' on this objectz!Error %d while updating SHA-3/384)r r � TypeErrorr Z keccak_absorbr r r r �lenr )r r r r r r r A s ��zSHA3_384_Hash.updatec C sJ d| _ t| j�}t�| j�� |t| j��}|r:td| ��t |�| _ | j S )z�Return the **binary** (non-printable) digest of the message that has been hashed so far. :return: The hash digest, computed over the data processed so far. Binary form. :rtype: byte string Tr )r r r r Z keccak_digestr r r r r Z _digest_value)r Zbfrr r r r �digestS s �� zSHA3_384_Hash.digestc C s d� dd� | �� D ��S )z�Return the **printable** digest of the message that has been hashed so far. :return: The hash digest, computed over the data processed so far. Hexadecimal encoded. :rtype: string � c S s g | ]}d t |� �qS )z%02xr )�.0�xr r r � <listcomp>p � z+SHA3_384_Hash.hexdigest.<locals>.<listcomp>)�joinr"