| Server IP : 35.80.110.71 / Your IP : 216.73.216.221 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/Cryptodome/Hash/__pycache__/ |
Upload File : |
�
��e4 � �r � d dl mZ d dlmZmZmZmZmZmZm Z edd� Z
G d� de� Zdd�Z
d Zd
Zd� Zy)
� )�bord)�load_pycryptodome_raw_lib�VoidPointer�SmartPointer�create_string_buffer�get_raw_buffer�c_size_t�c_uint8_ptrzCryptodome.Hash._SHA512a
int SHA512_init(void **shaState,
size_t digest_size);
int SHA512_destroy(void *shaState);
int SHA512_update(void *hs,
const uint8_t *buf,
size_t len);
int SHA512_digest(const void *shaState,
uint8_t *digest,
size_t digest_size);
int SHA512_copy(const void *src, void *dst);
int SHA512_pbkdf2_hmac_assist(const void *inner,
const void *outer,
const uint8_t *first_digest,
uint8_t *final_digest,
size_t iterations,
size_t digest_size);
c �: � e Zd ZdZdZd� Zd� Zd� Zd� Zd� Z d
d �Z
y)�
SHA512Hasha� A SHA-512 hash object (possibly in its truncated version SHA-512/224 or
SHA-512/256.
Do not instantiate directly. Use the :func:`new` function.
:ivar oid: ASN.1 Object ID
:vartype oid: string
:ivar block_size: the size in bytes of the internal message block,
input to the compression function
:vartype block_size: integer
:ivar digest_size: the size in bytes of the resulting hash
:vartype digest_size: integer
� c � � || _ |�d| _ d| _ n3|dk( rd| _ d| _ n|dk( rd| _ d| _ nt d � �t � }t
j
|j � t | j � � }|rt d
|z � �t |j � t
j � | _ |r| j |� y y )Nz2.16.840.1.101.3.4.2.3�@ �224z2.16.840.1.101.3.4.2.5� �256z2.16.840.1.101.3.4.2.6� z7Incorrect truncation length. It must be '224' or '256'.z$Error %d while instantiating SHA-512)� _truncate�oid�digest_size�
ValueErrorr �_raw_sha512_lib�SHA512_init�
address_ofr r �get�SHA512_destroy�_state�update)�self�data�truncate�state�results �8/usr/lib/python3/dist-packages/Cryptodome/Hash/SHA512.py�__init__zSHA512Hash.__init__E s� � �!�����/�D�H�!�D��
��
�/�D�H�!�D��
��
�/�D�H�!�D���V�W�W��
�� �,�,�U�-=�-=�-?�-5�d�6F�6F�-G�I����C�%�&� '�
'�"�5�9�9�;�#2�#A�#A�C�����K�K��� � c � � t j | j j � t |� t t
|� � � }|rt d|z � �y)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.
z'Error %d while hashing data with SHA512N)r �
SHA512_updater r r
r �lenr )r r r# s r$ r zSHA512Hash.update_ sX � � !�.�.�t�{�{���/@�/:�4�/@�/7��D� �/B�D�� ��F�%�&� '�
'� r&