관리-도구
편집 파일: padding.cpython-311.pyc
� �܋fb � �> � d dl mZ d dlZd dlZd dlmZ d dlmZ d dlm Z m Z G d� dej �� � Zd'd �Z d(d�Zd)d�Zd(d�Zd*d�Z G d� d� � Z G d� de� � Z G d� d e� � Z G d!� d"� � Z G d#� d$e� � Z G d%� d&e� � ZdS )+� )�annotationsN)�utils)�AlreadyFinalized)�check_ansix923_padding�check_pkcs7_paddingc �R � e Zd Zej dd�� � Zej dd�� � ZdS ) �PaddingContext�data�bytes�returnc � � dS )zR Pads the provided bytes and returns any available data as bytes. N� )�selfr s �y/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/cryptography/hazmat/primitives/padding.py�updatezPaddingContext.update � � � � � c � � dS )z6 Finalize the padding, returns bytes. Nr �r s r �finalizezPaddingContext.finalize r r N�r r r r �r r )�__name__� __module__�__qualname__�abc�abstractmethodr r r r r r r sZ � � � � � ���� � � ��� ��� � � ��� � r r )� metaclass� block_size�intr �Nonec �r � d| cxk rdk sn t d� � �| dz dk rt d� � �d S )Nr i� z%block_size must be in range(0, 2041).� z#block_size must be a multiple of 8.)� ValueError)r s r �_byte_padding_checkr% sV � � ��#�#�#�#�t�#�#�#�#��@�A�A�A��A�~�����>�?�?�?� �r �buffer_�typing.Optional[bytes]r r �typing.Tuple[bytes, bytes]c �� � | �t d� � �t j d|� � | t |� � z } t | � � |dz z }| d ||dz z � }| ||dz z d � } | |fS )N�Context was already finalized.r r# )r r �_check_bytesliker �len�r&