Submit
Path:
~
/
/
opt
/
alt
/
python37
/
lib64
/
python3.7
/
site-packages
/
cryptography
/
hazmat
/
primitives
/
__pycache__
/
File Content:
hashes.cpython-37.opt-1.pyc
B \��`D � @ sv d dl mZmZmZ d dlZd dlZd dlmZ d dlm Z m Z mZ d dlm Z e�ej�G dd� de��Ze�ej�G dd � d e��Ze�e�G d d� de��Ze�e�G dd � d e��Ze�e�G dd� de��Ze�e�G dd� de��Ze�e�G dd� de��Ze�e�G dd� de��Ze�e�G dd� de��Ze�e�G dd� de��Ze�e�G dd� de��ZdS )� )�absolute_import�division�print_functionN)�utils)�AlreadyFinalized�UnsupportedAlgorithm�_Reasons)�HashBackendc @ s( e Zd Zejdd� �Zejdd� �ZdS )� HashAlgorithmc C s dS )zH A string naming this algorithm (e.g. "sha256", "md5"). N� )�selfr r �X/opt/alt/python37/lib64/python3.7/site-packages/cryptography/hazmat/primitives/hashes.py�name s zHashAlgorithm.namec C s dS )z< The size of the resulting digest in bytes. Nr )r r r r �digest_size s zHashAlgorithm.digest_sizeN)�__name__� __module__�__qualname__�abc�abstractpropertyr r r r r r r s r c @ sD e Zd Zejdd� �Zejdd� �Zejdd� �Zejdd� �Z d S ) �HashContextc C s dS )zD A HashAlgorithm that will be used by this context. Nr )r r r r � algorithm# s zHashContext.algorithmc C s dS )z@ Processes the provided bytes through the hash. Nr )r �datar r r �update) s zHashContext.updatec C s dS )zR Finalizes the hash context and returns the hash digest as bytes. Nr )r r r r �finalize/ s zHashContext.finalizec C s dS )zM Return a HashContext that is a copy of the current context. Nr )r r r r �copy5 s zHashContext.copyN) r r r r r r �abstractmethodr r r r r r r r ! s r c @ s8 e Zd Zddd�Ze�d�Zdd� Zdd� Zd d � Z dS )�HashNc C sX t |t�stdtj��t |t�s(td��|| _|| _|d krN| j� | j �| _n|| _d S )Nz.Backend object does not implement HashBackend.z*Expected instance of hashes.HashAlgorithm.)� isinstancer r r ZBACKEND_MISSING_INTERFACEr � TypeError� _algorithm�_backendZcreate_hash_ctxr �_ctx)r r �backend�ctxr r r �__init__>