Submit
Path:
~
/
/
opt
/
alt
/
python37
/
lib64
/
python3.7
/
site-packages
/
cryptography
/
hazmat
/
backends
/
openssl
/
__pycache__
/
File Content:
utils.cpython-37.opt-1.pyc
B \��`w � @ s\ d dl mZmZmZ d dlZd dlmZ d dlmZ d dl m Z dd� Zdd � Zd d� Z dS )� )�absolute_import�division�print_functionN)�utils)�hashes)� Prehashedc C sN t |t�s*t�|| �}|�|� |�� }n|j}t|�|jkrFt d��||fS )NzNThe provided data must be the same length as the hash algorithm's digest size.) � isinstancer r ZHash�updateZfinalizeZ _algorithm�lenZdigest_size� ValueError)Zbackend�data� algorithmZhash_ctx� r �]/opt/alt/python37/lib64/python3.7/site-packages/cryptography/hazmat/backends/openssl/utils.py�_calculate_digest_and_algorithm s r c C s t | t�rtd��d S )NzfPrehashed is only supported in the sign and verify methods. It cannot be used with signer or verifier.)r r � TypeError)Zsignature_algorithmr r r �_check_not_prehashed s r c C s t jdtjdd� d S )NzMsigner and verifier have been deprecated. Please use sign and verify instead.� )� stacklevel)�warnings�warnr ZPersistentlyDeprecatedr r r r �_warn_sign_verify_deprecated'