관리-도구
편집 파일: padding.cpython-36.opt-1.pyc
3 l�_o � @ s d dl mZmZmZ d dlZd dlZd dlmZ d dlm Z d dl mZ ejej �G dd� de��Zdd � Zd d� Zdd � Zdd� Zdd� ZG dd� de�Zeje�G dd� de��Zeje�G dd� de��ZG dd� de�Zeje�G dd� de��Zeje�G dd� de��ZdS )� )�absolute_import�division�print_functionN)�utils)�AlreadyFinalized)�libc @ s( e Zd Zejdd� �Zejdd� �ZdS )�PaddingContextc C s dS )zR Pads the provided bytes and returns any available data as bytes. N� )�self�datar r �/usr/lib64/python3.6/padding.py�update s zPaddingContext.updatec C s dS )z6 Finalize the padding, returns bytes. Nr )r r r r �finalize s zPaddingContext.finalizeN)�__name__� __module__�__qualname__�abc�abstractmethodr r r r r r r s r c C s8 d| kodkn s t d��| d dkr4t d��d S )Nr i� z%block_size must be in range(0, 2041).� z#block_size must be a multiple of 8.)� ValueError)� block_sizer r r �_byte_padding_check s r c C sh | d krt d��tjd|� | t|�7 } t| �|d }| d ||d � }| ||d d � } | |fS )NzContext was already finalized.r r )r r �_check_byteslike�bytes�len)�buffer_r r �finished_blocks�resultr r r �_byte_padding_update'