File: //lib/python3/dist-packages/cryptography/hazmat/primitives/__pycache__/hashes.cpython-310.pyc
o
�)%a� � @ s� d dl Z d dlZd dlmZ d dlmZmZmZ d dlm Z d dl
mZ G dd� de jd�Z
G d d
� d
e jd�ZG dd� de jd�ZG d
d� de�ZG dd� de
�ZG dd� de
�ZG dd� de
�ZG dd� de
�ZG dd� de
�ZG dd� de
�ZG dd� de
�ZG dd� de
�ZG dd � d e
�ZG d!d"� d"e
�ZG d#d$� d$e
�ZG d%d&� d&e
e�ZG d'd(� d(e
e�ZG d)d*� d*e
�ZG d+d,� d,e
�ZG d-d.� d.e
�Z dS )/� N)�utils)�AlreadyFinalized�UnsupportedAlgorithm�_Reasons)�_get_backend)�HashBackendc @ sN e Zd Zejdefdd��Zejdefdd��Zejde j
e fdd��ZdS ) �
HashAlgorithm�returnc C � dS )zH
A string naming this algorithm (e.g. "sha256", "md5").
N� ��selfr r �G/usr/lib/python3/dist-packages/cryptography/hazmat/primitives/hashes.py�name � zHashAlgorithm.namec C r
)z<
The size of the resulting digest in bytes.
Nr r r r r �digest_size r zHashAlgorithm.digest_sizec C r
)z�
The internal block size of the hash function, or None if the hash
function does not use blocks internally (e.g. SHA3).
Nr r r r r �
block_size r zHashAlgorithm.block_sizeN)�__name__�
__module__�__qualname__�abc�abstractproperty�strr �intr �typing�Optionalr r r r r r s r )� metaclassc @ s\ e Zd Zejdefdd��Zejdeddfdd��Z ejdefdd ��Z
ejdd
d��ZdS )
�HashContextr c C r
)zD
A HashAlgorithm that will be used by this context.
Nr r r r r � algorithm( r zHashContext.algorithm�dataNc C r
)z@
Processes the provided bytes through the hash.
Nr �r
r r r r �update. r zHashContext.updatec C r
)zR
Finalizes the hash context and returns the hash digest as bytes.
Nr r r r r �finalize4 r zHashContext.finalizec C r
)zM
Return a HashContext that is a copy of the current context.
Nr r r r r �copy: r zHashContext.copy)r r )r r r r r r r �abstractmethod�bytesr! r"