관리-도구
편집 파일: cmac.cpython-36.opt-1.pyc
3 T��e� � @ s| d dl mZmZmZ d dlmZ d dlmZmZm Z d dl mZ d dlm Z d dlmZmZ ejej�G dd� de��Zd S ) � )�absolute_import�division�print_function)�utils)�AlreadyFinalized�UnsupportedAlgorithm�_Reasons)�_get_backend)�CMACBackend)�ciphers�macc @ s6 e Zd Zddd�Zdd� Zdd� Zdd � Zd d� ZdS ) �CMACNc C sb t |�}t|t�stdtj��t|tj�s2td��|| _ || _ |d krX| j j| j �| _n|| _d S )Nz.Backend object does not implement CMACBackend.z*Expected instance of BlockCipherAlgorithm.) r � isinstancer r r ZBACKEND_MISSING_INTERFACEr ZBlockCipherAlgorithm� TypeError� _algorithm�_backendZcreate_cmac_ctx�_ctx)�self� algorithm�backend�ctx� r �/usr/lib64/python3.6/cmac.py�__init__ s z CMAC.__init__c C s. | j d krtd��tjd|� | j j|� d S )NzContext was already finalized.�data)r r r �_check_bytes�update)r r r r r r &