Submit
Path:
~
/
/
opt
/
alt
/
python37
/
lib64
/
python3.7
/
site-packages
/
cryptography
/
hazmat
/
backends
/
openssl
/
__pycache__
/
File Content:
cmac.cpython-37.pyc
B \��` � @ sp d dl mZmZmZ d dlmZ d dlmZmZm Z d dl mZmZ d dl mZ e�ej�G dd� de��ZdS ) � )�absolute_import�division�print_function)�utils)�InvalidSignature�UnsupportedAlgorithm�_Reasons)� constant_time�mac)�CBCc @ s@ e Zd Zd dd�Ze�d�Zdd� Zdd� Zd d � Z dd� Z dS )�_CMACContextNc C s� |� |�stdtj��|| _|j| _|| _|jd | _ |d kr�| jj }|t|�tf }|| j|t�}| jj �� }| j�|| jjjk� | jj�|| jj j�}| jj �|| jt| j�|| jjj�}| j�|dk� || _d S )Nz#This backend does not support CMAC.� � )Zcmac_algorithm_supportedr r ZUNSUPPORTED_CIPHER�_backend�keyZ_key� _algorithmZ block_size�_output_lengthZ_cipher_registry�typer �_lib�CMAC_CTX_new�openssl_assert�_ffiZNULL�gc� CMAC_CTX_freeZ CMAC_Init�len�_ctx)�selfZbackend� algorithm�ctx�registryZadapterZ evp_cipher�res� r! �\/opt/alt/python37/lib64/python3.7/site-packages/cryptography/hazmat/backends/openssl/cmac.py�__init__ s&