관리-도구
편집 파일: interfaces.cpython-39.pyc
a �ao( � @ s( d dl Z G dd� de jd�ZG dd� de jd�ZG dd� de jd�ZG d d � d e jd�ZG dd� de jd�ZG d d� de jd�ZG dd� de jd�ZG dd� de jd�Z G dd� de jd�Z G dd� de jd�ZG dd� de jd�ZG dd� de jd�Z G dd� deeeeee eeeee e e jd�ZdS )� Nc @ s6 e Zd Zejdd� �Zejdd� �Zejdd� �ZdS )� CipherBackendc C s dS )zI Return True if the given cipher and mode are supported. N� ��selfZcipher�moder r �M/usr/lib64/python3.9/site-packages/cryptography/hazmat/backends/interfaces.py�cipher_supported s zCipherBackend.cipher_supportedc C s dS )zF Get a CipherContext that can be used for encryption. Nr r r r r �create_symmetric_encryption_ctx s z-CipherBackend.create_symmetric_encryption_ctxc C s dS )zF Get a CipherContext that can be used for decryption. Nr r r r r �create_symmetric_decryption_ctx s z-CipherBackend.create_symmetric_decryption_ctxN)�__name__� __module__�__qualname__�abc�abstractmethodr r r r r r r r s r )� metaclassc @ s( e Zd Zejdd� �Zejdd� �ZdS )�HashBackendc C s dS )zQ Return True if the hash algorithm is supported by this backend. Nr �r � algorithmr r r �hash_supported s zHashBackend.hash_supportedc C s dS )zH Create a HashContext for calculating a message digest. Nr r r r r �create_hash_ctx$ s zHashBackend.create_hash_ctxN)r r r r r r r r r r r r s r c @ s( e Zd Zejdd� �Zejdd� �ZdS )�HMACBackendc C s dS )zb Return True if the hash algorithm is supported for HMAC by this backend. Nr r r r r �hmac_supported, s zHMACBackend.hmac_supportedc C s dS �zQ Create a context for calculating a message authentication code. Nr )r �keyr r r r �create_hmac_ctx3 s zHMACBackend.create_hmac_ctxN)r r r r r r r r r r r r + s r c @ s( e Zd Zejdd� �Zejdd� �ZdS )�CMACBackendc C s dS )zX Returns True if the block cipher is supported for CMAC by this backend Nr r r r r �cmac_algorithm_supported; s z$CMACBackend.cmac_algorithm_supportedc C s dS r r r r r r �create_cmac_ctxA s zCMACBackend.create_cmac_ctxN)r r r r r r r r r r r r : s r c @ s( e Zd Zejdd� �Zejdd� �ZdS )�PBKDF2HMACBackendc C s dS )zd Return True if the hash algorithm is supported for PBKDF2 by this backend. Nr r r r r �pbkdf2_hmac_supportedI s z'PBKDF2HMACBackend.pbkdf2_hmac_supportedc C s dS )zN Return length bytes derived from provided PBKDF2 parameters. Nr )r r �length�saltZ iterations�key_materialr r r �derive_pbkdf2_hmacP s z$PBKDF2HMACBackend.derive_pbkdf2_hmacN)r r r r r r r# r r r r r H s r c @ sR e Zd Zejdd� �Zejdd� �Zejdd� �Zejdd� �Zejd d � �Z dS )� RSABackendc C s dS )zq Generate an RSAPrivateKey instance with public_exponent and a modulus of key_size bits. Nr �r Zpublic_exponent�key_sizer r r �generate_rsa_private_keyZ s z#RSABackend.generate_rsa_private_keyc C s dS )zQ Returns True if the backend supports the given padding options. Nr )r Zpaddingr r r �rsa_padding_supporteda s z RSABackend.rsa_padding_supportedc C s dS )zg Returns True if the backend supports the given parameters for key generation. Nr r% r r r �!generate_rsa_parameters_supportedg s z,RSABackend.generate_rsa_parameters_supportedc C s dS )z4 Returns an RSAPrivateKey provider. Nr �r Znumbersr r r �load_rsa_private_numbersn s z#RSABackend.load_rsa_private_numbersc C s dS )z3 Returns an RSAPublicKey provider. Nr r* r r r �load_rsa_public_numberst s z"RSABackend.load_rsa_public_numbersN) r r r r r r'