관리-도구
편집 파일: interfaces.cpython-36.opt-1.pyc
3 l�_* � @ s� d dl mZmZmZ d dlZd dlZejej�G dd� de��Z ejej�G dd� de��Z ejej�G dd� de��Zejej�G d d � d e��Zejej�G dd� de��Z ejej�G d d� de��Zejej�G dd� de��Zejej�G dd� de��Zejej�G dd� de��Zejej�G dd� de��Zejej�G dd� de��Zejej�G dd� de��Zejej�G dd� de��ZdS )� )�absolute_import�division�print_functionNc @ s6 e Zd Zejdd� �Zejdd� �Zejdd� �ZdS )� CipherBackendc C s dS )zI Return True if the given cipher and mode are supported. N� )�self�cipher�moder r �"/usr/lib64/python3.6/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 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 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 c @ 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 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 r �hmac_supported2 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_ctx9 s zHMACBackend.create_hmac_ctxN)r r r r r r r r r r r r 0 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 r �cmac_algorithm_supportedB s z$CMACBackend.cmac_algorithm_supportedc C s dS )zQ Create a context for calculating a message authentication code. Nr )r r r r r �create_cmac_ctxH 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 r �pbkdf2_hmac_supportedQ 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_hmacX s z$PBKDF2HMACBackend.derive_pbkdf2_hmacN)r r r r r r r# r r r r r O 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 �public_exponent�key_sizer r r �generate_rsa_private_keyc 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_supportedj 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&