a ao( @ s( d dl Z G dd de jdZG dd de jdZG dd de jdZG d d d e jdZG dd de jdZG d d de jdZG dd de jdZG dd de jdZ G dd de jdZ G dd de jdZG dd de jdZG dd de jdZ G dd deeeeee eeeee e e jdZdS ) Nc @ s6 e Zd Zejdd Zejdd Zejdd ZdS ) CipherBackendc C s dS )zI Return True if the given cipher and mode are supported. N selfZciphermoder r M/usr/lib64/python3.9/site-packages/cryptography/hazmat/backends/interfaces.pycipher_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__abcabstractmethodr 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 lengthsaltZ iterationskey_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_exponentkey_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' r( r) r+ r, r r r r r$ Y s r$ c @ s| e Zd Zejdd Zejdd Zejdd Zejdd Zejd d Z ejdd Z ejd d Zejdd ZdS ) DSABackendc C s dS )zT Generate a DSAParameters instance with a modulus of key_size bits. Nr r r&