ok
Direktori : /lib64/python3.6/site-packages/cryptography/hazmat/primitives/kdf/__pycache__/ |
Current File : //lib64/python3.6/site-packages/cryptography/hazmat/primitives/kdf/__pycache__/hkdf.cpython-36.pyc |
3 l�_ � @ s� d dl mZmZmZ d dlZd dlmZ d dlmZm Z m Z mZ d dlm Z d dlmZ d dlmZmZ d dlmZ eje�G d d � d e��Zeje�G dd� de��ZdS ) � )�absolute_import�division�print_functionN)�utils)�AlreadyFinalized� InvalidKey�UnsupportedAlgorithm�_Reasons)�_get_backend)�HMACBackend)� constant_time�hmac)�KeyDerivationFunctionc @ s. e Zd Zd dd�Zdd� Zdd� Zdd � ZdS )�HKDFNc C sh t |�}t|t�stdtj��|| _|d kr:d| jj }ntj d|� || _ || _t| j|||�| _ d S )Nz.Backend object does not implement HMACBackend.� �salt)r � isinstancer r r �BACKEND_MISSING_INTERFACE� _algorithm�digest_sizer �_check_bytes�_salt�_backend� HKDFExpand�_hkdf_expand)�self� algorithm�lengthr �info�backend� r �/usr/lib64/python3.6/hkdf.py�__init__ s z HKDF.__init__c C s( t j| j| j| jd�}|j|� |j� S )N)r )r �HMACr r r �update�finalize)r �key_material�hr r r! �_extract- s z HKDF._extractc C s t jd|� | jj| j|��S )Nr&